Ejemplo n.º 1
0
 public SocketClient(string ip, Int32 port, Int32 bufferSize, string localIp)
 {
     protocol           = new BaseProtocol();
     _client            = new TCPAsyncClient(ip, port, bufferSize, protocol, localIp, 0);
     _client.Connected += client_Connected;
     _client.Closed    += client_Closed;
     _client.Error     += client_Error;
     protocol.Receive  += protocol_ReceiveData;
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            TCPAsyncClient client = new TCPAsyncClient(args[0], Convert.ToInt32(args[1]));

            client.Start();
        }