コード例 #1
0
        public TCPChatCore(string ipAddress, int port, object handler = null)
        {
            IPAddress = IPAddress.Parse(ipAddress);
            Port      = port;

            if (handler != null)
            {
                mMessageHandlers = new MessageHandlersService(handler);
            }
        }
コード例 #2
0
        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);
        }