public TcpServer(long handle, long port, Tcp.Protocol protocol) { _handle = handle; _protocol = protocol; _ip = new IPEndPoint(IPAddress.Any, (int)port); _listener = new Socket(_ip.AddressFamily, SocketType.Stream, ProtocolType.Tcp); _clients = new Dictionary <long, TcpServerSession> (); _requests = new Dictionary <long, TcpServerSession> (); _inbox = new TcpListenBox(); }
public TcpClient(long handle, RCSymbolScalar symbol, Tcp.Protocol protocol, int timeout) { _protocol = protocol; _handle = handle; _host = (string)symbol.Part(1); _port = (long)symbol.Part(2); _inbox = new TcpReceiveBox(); _outbox = new TcpOutBox(); _buffer = new TcpMessageBuffer(); _timeout = timeout; _timeoutTimer = null; }