public bool StartClient(string address, int port) { while (clientEventQueue.TryDequeue(out _)) { } return(wsClient.StartClient(address, port)); }
public bool StartClient(string address, int port) { while (clientEventQueue.TryDequeue(out _)) { } #if UNITY_WEBGL return(wsClient.StartClient(address, port)); #else Client = new NetManager(new MixTransportEventListener(this, clientEventQueue)); Client.ChannelsCount = clientDataChannelsCount; return(Client.Start() && Client.Connect(address, port, ConnectKey) != null); #endif }