public TCPChatCore(string ipAddress, int port, object handler = null) { IPAddress = IPAddress.Parse(ipAddress); Port = port; if (handler != null) { mMessageHandlers = new MessageHandlersService(handler); } }
public TCPChatServer(int port, string serverName, ILogger logger) { lock (Locker) { Port = port; ServerUser = new ChatUser(Constants.ServerId, serverName); Logger = logger; } ChatMail = new ChatMail(Clients); mMessageHandlers = new MessageHandlersService(this); }