LiteNetLib.Utils.NetDataReader.GetNetEndPoint C# (CSharp) Method

GetNetEndPoint() public method

public GetNetEndPoint ( ) : NetEndPoint
return NetEndPoint
        public NetEndPoint GetNetEndPoint()
        {
            string host = GetString(1000);
            int port = GetInt();
            return new NetEndPoint(host, port);
        }

Usage Example

Example #1
0
 private void HandleNatIntroductionRequest(NetEndPoint senderEndPoint, NetDataReader dr)
 {
     NetEndPoint localEp = dr.GetNetEndPoint();
     string token = dr.GetString(MaxTokenLength);
     lock (_requestEvents)
     {
         _requestEvents.Enqueue(new RequestEventData
         {
             LocalEndPoint = localEp,
             RemoteEndPoint = senderEndPoint,
             Token = token
         });
     }
 }
All Usage Examples Of LiteNetLib.Utils.NetDataReader::GetNetEndPoint