예제 #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);
 }
예제 #2
0
파일: Form1.cs 프로젝트: rensk63/cs-3500
 public Form1()
 {
     InitializeComponent();
     model = new ChatClientModel();
     model.IncomingLineEvent += MessageReceived;
 }