コード例 #1
0
 public void CloseOpenAllConnections()
 {
     foreach (var c in _clients)
     {
         NN.Close(c.Socket); // could return -1 (error). todo: handle better.
         CreateAndConnectSocket(c);
     }
 }
コード例 #2
0
        public static void DestroyServerSockets()
        {
            foreach (var kvp in _socketPorts)
            {
                NN.Close(kvp.Key);
            }

            _socketPorts = new Dictionary <int, int>();
            _listener    = new NanomsgListener();
        }
コード例 #3
0
 public void Dispose()
 {
     foreach (var c in _clients)
     {
         try
         {
             NN.Close(c.Socket);
         }
         catch { }
     }
 }
コード例 #4
0
 public void CloseOpenConnection(NanoConnection c)
 {
     NN.Close(c.Socket); // could return -1 (error). todo: handle better.
     CreateAndConnectSocket(c);
 }