Exemplo n.º 1
0
 /// <summary>
 /// Initialize the UDP packet handler in server mode
 /// </summary>
 /// <param name="port">Port to listening for incoming UDP packets on</param>
 public UDPBase(int port)
 {
     udpPort     = port;
     _bufferPool = new PacketBufferPool(new IPEndPoint(IPAddress.Any, udpPort), 64, 1);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize the UDP packet handler in client mode
 /// </summary>
 /// <param name="endPoint">Remote UDP server to connect to</param>
 public UDPBase(IPEndPoint endPoint)
 {
     remoteEndPoint = endPoint;
     udpPort        = 0;
     _bufferPool    = new PacketBufferPool(endPoint, 64, 1);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initialize the UDP packet handler in server mode
 /// </summary>
 /// <param name="port">Port to listening for incoming UDP packets on</param>
 public UDPBase(int port)
 {
     udpPort     = port;
     _bufferPool = new PacketBufferPool(new IPEndPoint(Settings.BIND_ADDR, udpPort), 64, 1);
 }