MiniUDP.NetPeer.NetPeer C# (CSharp) Method

NetPeer() private method

private NetPeer ( IPEndPoint endPoint, string token, bool isClient, long creationTick ) : System
endPoint System.Net.IPEndPoint
token string
isClient bool
creationTick long
return System
        internal NetPeer(
      IPEndPoint endPoint, 
      string token,
      bool isClient, 
      long creationTick)
        {
            // Probably no need to pool this class since users may want to hold on
              // to them after closing and they aren't created all that often anyway

              this.ClosedByUser = false;
              this.payloadSeqOut = 0;

              this.AckRequested = false;

              this.traffic = new NetTraffic(creationTick);
              this.outgoing = new Queue<NetEvent>();
              this.endPoint = endPoint;
              this.isClient = isClient;
              this.token = token;

              this.notificationSeq = 1;

              if (isClient) // Client peers are created after a successful connection
            this.status = NetPeerStatus.Connected;
              else // Host peers are created in the process of to connecting to them
            this.status = NetPeerStatus.Connecting;
        }