public SimpleUDPServer(int port, DatagramReceiveHandler handler, Encoding encoding) { client = new UdpClient(port); localIPEndPoint = new IPEndPoint(IPAddress.Loopback, port); this.handler = handler; this.encoding = encoding; }
public SimpleTCPServer(int port, DatagramReceiveHandler handler, Encoding encoding) { endPoint = new IPEndPoint(IPAddress.Loopback, port); server = new TcpListener(endPoint); this.handler = handler; this.encoding = encoding; }
public SimpleTCPServer(int port, DatagramReceiveHandler handler) : this(port, handler, Encoding.Unicode) { }