Exemplo n.º 1
0
 private void ConnectionRequested(IAsyncResult ar)
 {
     connection = new ChatClientModel(server.EndAcceptSocket(ar));
     connection.IncomingLineEvent += connection_IncomingLineEvent;
     if (newConnection != null)
     {
         newConnection(true);
     }
     server.BeginAcceptSocket(ConnectionRequested, null);
     heartbeatTimer.Change(1000, 1000);
 }
Exemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     model = new ChatClientModel();
     model.IncomingLineEvent += MessageReceived;
 }