public WebSocketServer(TcpConfig tcpConfig, int maxMessageSize, SslConfig sslConfig, BufferPool bufferPool) { this.tcpConfig = tcpConfig; this.maxMessageSize = maxMessageSize; sslHelper = new ServerSslHelper(sslConfig); this.bufferPool = bufferPool; handShake = new ServerHandshake(this.bufferPool); }
public ServerSslHelper(SslConfig sslConfig) { config = sslConfig; if (config.enabled) { certificate = new X509Certificate2(config.certPath, config.certPassword); } }
public SimpleWebServer(int maxMessagesPerTick, TcpConfig tcpConfig, int maxMessageSize, int handshakeMaxSize, SslConfig sslConfig) { this.maxMessagesPerTick = maxMessagesPerTick; // use max because bufferpool is used for both messages and handshake int max = Math.Max(maxMessageSize, handshakeMaxSize); bufferPool = new BufferPool(5, 20, max); server = new WebSocketServer(tcpConfig, maxMessageSize, handshakeMaxSize, sslConfig, bufferPool); }
public SimpleWebServer(int maxMessagesPerTick, TcpConfig tcpConfig, int maxMessageSize, SslConfig sslConfig) { this.maxMessagesPerTick = maxMessagesPerTick; bufferPool = new BufferPool(5, 20, maxMessageSize); server = new WebSocketServer(tcpConfig, maxMessageSize, sslConfig, bufferPool); }