/// <summary> /// Create a TCP communications server. /// </summary> /// <param name="port">Port to open for listening.</param> /// <param name="messageSink">Where to send received messages.</param> public Server(int port, ServerMessageSink messageSink) { _localEndPoint = new IPEndPoint(IPAddress.Any, port); _messageSink = messageSink; _messageQueue = new GenericPCQueue <MessageManagerCombo>(QueueMessageSink); }
/// <summary> /// Create a TCP communications client. /// </summary> /// <param name="serverEndPoint">IP Address and Port combination of Server.</param> /// <param name="messageSink">The message sink to call for messages.</param> public Client(IPEndPoint serverEndPoint, ClientMessageSink messageSink) { _serverEndpoint = serverEndPoint; _messageSink = messageSink; _messageQueue = new GenericPCQueue <IrssMessage>(QueueMessageSink); }