示例#1
0
        public Client(TcpClient cli)
        {
            SocketClient = cli;

            Cli_Listener = new ClientListener(cli);
            Cli_Sender = new ClientSender(cli);

            ClientID = Guid.NewGuid().ToString();

            ConnectionAlive = true;

            Cli_Listener.ClientMessageReceived += new ClientListener.ClientMessageReceivedEventHandler(Cli_Listener_ClientMessageReceived);
            Cli_Listener.ClientEndedConnection += new ClientListener.ClientConnectionEndedEventHandler(Cli_Listener_ClientEndedConnection);
        }
示例#2
0
 void Cli_Listener_ClientMessageReceived(ClientListener sender, NetMessage cliMsg)
 {
     OnClientMessageReceived(cliMsg);
 }
示例#3
0
 void Cli_Listener_ClientEndedConnection(ClientListener sender)
 {
     OnClientEndedConnection();
 }