/// <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); }
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); }
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(); }
/// <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); }