Exemplo n.º 1
0
 public HoNServerTester()
 {
     this.Servers = new Dictionary<UInt16, HoNServer>();
     this.ServerKeys = new List<UInt16>();
     this.udp = new UdpClient();
     this.udp.Client.ReceiveTimeout = 1000;
     this.gb = new GenericBuffer();
     this.r = new HoNRecvBuffer();
 }
Exemplo n.º 2
0
        public void Login(string Username, string Password)
        {
            HoNBuffer = new GenericBuffer();
            HoNRecv = new HoNRecvBuffer();
            packetRecv = new HoNRecvBuffer();

            this._login = new HoNClientLogin();
            this._login.Login += new HoNLoginInfoEventHandler(_login_Login);

            this._conn = new AsynchronousTCPClient();
            this._conn.onConnected += new SocketConnectedHandler(_conn_onConnected);
            this._conn.onConnecting += new SocketConnectingHandler(_conn_onConnecting);
            this._conn.onDisconnected += new SocketDisconnectedHandler(_conn_onDisconnected);
            this._conn.onDisconnecting += new SocketDisconnectingHandler(_conn_onDisconnecting);
            this._conn.onError += new SocketErroredHandler(_conn_onError);
            this._conn.onRecv += new SocketReceivedDataHandler(_conn_onRecv);
            this._conn.onSend += new SocketSendDataHandler(_conn_onSend);

            this._login.DoLogin(Username, Password);
        }