我的服务器是使用 SuperWebSocket 运行的,服务器代码如下:
var server = new WebSocketServer();
var config = new ServerConfig();
config.Port = 4015;
config.Security = "Tls";
config.Certificate = new CertificateConfig{
FilePath = serverConfiguration.Certificate.Path,
ClientCertificateRequired = true
}
server.Setup(config);
server.Start();
对于客户端,我正在尝试使用 WebSocket4Net,并且我正在尝试配置客户端应该提供的证书,但当前客户端代码是:
var client = new WebSocket("wss://localhost:4015, "basic", WebSocketVersion.Rfc6455);
client.Open();