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); }
void Cli_Listener_ClientMessageReceived(ClientListener sender, NetMessage cliMsg) { OnClientMessageReceived(cliMsg); }
void Cli_Listener_ClientEndedConnection(ClientListener sender) { OnClientEndedConnection(); }