public WebSocketTransport(bool secure, string certificateFilePath, string certificatePassword) { this.secure = secure; this.certificateFilePath = certificateFilePath; this.certificatePassword = certificatePassword; clientEventQueue = new ConcurrentQueue <TransportEventData>(); wsClient = new WsClientWrapper(clientEventQueue, secure, SslProtocols.Tls12); }
public MixTransport(string connectKey, int webSocketPortOffset, bool webSocketSecure, string webSocketCertificateFilePath, string webSocketCertificatePassword, byte clientDataChannelsCount, byte serverDataChannelsCount) { ConnectKey = connectKey; #if !UNITY_WEBGL serverPeers = new Dictionary <long, NetPeer>(); clientEventQueue = new ConcurrentQueue <TransportEventData>(); serverEventQueue = new ConcurrentQueue <TransportEventData>(); this.clientDataChannelsCount = clientDataChannelsCount; this.serverDataChannelsCount = serverDataChannelsCount; #endif this.webSocketPortOffset = webSocketPortOffset; this.webSocketSecure = webSocketSecure; this.webSocketCertificateFilePath = webSocketCertificateFilePath; this.webSocketCertificatePassword = webSocketCertificatePassword; #if UNITY_WEBGL wsClient = new WsClientWrapper(clientEventQueue, webSocketSecure, SslProtocols.Tls12); #endif }