Пример #1
0
 private void OnStopping(OTcpListener listener)
 {
     var handler = this.Stopping;
     if (handler != null)
     {
         handler(EventArgs.Empty, listener);
     }
 }
Пример #2
0
        private void OnStopping(OTcpListener listener)
        {
            var handler = this.Stopping;

            if (handler != null)
            {
                handler(EventArgs.Empty, listener);
            }
        }
Пример #3
0
 private void ListenerOnStopping(EventArgs eventArgs, OTcpListener oTcpListener)
 {
     log.Info("Listener stopping, stopping client.");
     this.Close();
 }
Пример #4
0
 public OTcpClient(TcpClient client, OTcpListener listener)
 {
     this.log.InfoFormat("Created from TcpClient {0}",client.Client.RemoteEndPoint);
     Client = client;
     listener.Stopping += ListenerOnStopping;
 }
Пример #5
0
 private void ListenerOnStopping(EventArgs eventArgs, OTcpListener oTcpListener)
 {
     log.Info("Listener stopping, stopping client.");
     this.Close();
 }
Пример #6
0
 public OTcpClient(TcpClient client, OTcpListener listener)
 {
     this.log.InfoFormat("Created from TcpClient {0}", client.Client.RemoteEndPoint);
     Client             = client;
     listener.Stopping += ListenerOnStopping;
 }