1.SuperWebSocket 相关dll 可百度
2.
3.
Setup(new WebSocketServer(), c =>
{
c.Port = port;
c.Security = "Tls12";
c.Ip = ip;
c.MaxConnectionNumber = 100000;//可允许连接的最大连接数;
c.MaxRequestLength = 100000;//最大允许的请求长度,默认值为1024;
c.LogAllSocketException = true;//是否记录所有Socket异常和错误;
c.Name ="SecureSuperWebSocket" ;
c.Mode = SocketMode.Tcp;
c.LogBasicSessionActivity = true;//是否记录session的基本活动,如连接和断开;
c.Certificate = !string.IsNullOrEmpty(CertificateFilePath) ? new CertificateConfig()
{
FilePath = CertificateFilePath,
Password = CertificatePassword
} : null;
});