Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public TcpSocketClient(string ip, int port, TcpSocketCientEvent <ITcpSocketClient, byte[]> clientEvent)
     : base(ip, port, clientEvent)
 {
 }
Exemplo n.º 3
0
 public BaseTcpSocketClient(string ip, int port, TcpSocketCientEvent <TSocketClient, TData> clientEvent)
 {
     Ip           = ip;
     Port         = port;
     _clientEvent = clientEvent;
 }