Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Client"/> class.
 /// </summary>
 /// <param name="username">
 /// The username.
 /// </param>
 public Client(string username)
 {
     this.username  = username;
     this.protocol  = Protocol.GpBinaryV162;
     this.dummyPeer = new DummyPeer(this.protocol, username);
     this.peer      = new MmoPeer(this.protocol, this.dummyPeer);
 }
Exemplo n.º 2
0
        public Client(string username)
        {
            this.username  = username;
            this.protocol  = SocketServer.Protocol.GpBinaryV162;
            this.dummyPeer = new DummyPeer(this.protocol, username);
            var initRequest = new InitRequest(this.protocol, dummyPeer);

            this.peer = new MmoPeer(initRequest);
            this.peer.Initialize(initRequest);
        }
Exemplo n.º 3
0
 public static void ResetStats()
 {
     Interlocked.Exchange(ref exceptions, 0);
     Interlocked.Exchange(ref eventsReceivedSent, 0);
     Interlocked.Exchange(ref eventReceiveTimeFast, 0);
     Interlocked.Exchange(ref eventReceiveTimeMiddle, 0);
     Interlocked.Exchange(ref eventReceiveTimeSlow, 0);
     Interlocked.Exchange(ref eventReceiveTimeMax, 0);
     Interlocked.Exchange(ref eventsReceivedFast, 0);
     Interlocked.Exchange(ref eventsReceivedMiddle, 0);
     Interlocked.Exchange(ref eventsReceivedSlow, 0);
     DummyPeer.ResetStats();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Client"/> class.
 /// </summary>
 /// <param name="username">
 /// The username.
 /// </param>
 public Client(string username)
 {
     this.username = username;
     this.protocol = Protocol.GpBinaryV161;
     this.dummyPeer = new DummyPeer(this.protocol, username);
     this.peer = new MmoPeer(this.protocol, this.dummyPeer);
 }