public WebSocketClient(string ip, int port, string path, TcpSocketCientEvent <IWebSocketClient, string> clientEvent)
            : base(ip, port, clientEvent)
        {
            string uri = $"ws://{ip}:{port}{path}";

            handshaker = WebSocketClientHandshakerFactory.NewHandshaker(
                new Uri(uri), WebSocketVersion.V13, null, true, new DefaultHttpHeaders());

            completionSource = new TaskCompletionSource();
        }
 public TcpSocketClient(string ip, int port, TcpSocketCientEvent <ITcpSocketClient, byte[]> clientEvent)
     : base(ip, port, clientEvent)
 {
 }
Beispiel #3
0
 public BaseTcpSocketClient(string ip, int port, TcpSocketCientEvent <TSocketClient, TData> clientEvent)
 {
     Ip           = ip;
     Port         = port;
     _clientEvent = clientEvent;
 }