예제 #1
0
        public TOSNetworkService(Socket socket)
        {
            _socketService = new TCPSocketService(socket);

            foreach (var key in _serverMessages.Keys)
            {
                OnMessage.Add(key, (service, message) => { });
            }

            _socketService.OnMessageReceived  += ProcessMessages;
            _socketService.OnConnected        += RaiseOnConnected;
            _socketService.OnConnectionFailed += RaiseOnConnectionFailed;
            _socketService.OnDisconnected     += RaiseOnDisconnected;
        }