addEvents() public méthode

public addEvents ( Ros_CSharp.CustomSocket.Socket s, int events ) : bool
s Ros_CSharp.CustomSocket.Socket
events int
Résultat bool
Exemple #1
0
 public void enableRead()
 {
     if (sock == null)
     {
         return;
     }
     if (!sock.Connected)
     {
         close();
     }
     lock (close_mutex)
     {
         if (closed)
         {
             return;
         }
     }
     if (!expecting_read && poll_set != null)
     {
         //Console.WriteLine("ENABLE READ:   " + Topic + "(" + sock.FD + ")");
         expecting_read = true;
         poll_set.addEvents(sock, POLLIN);
     }
 }
Exemple #2
0
 public void enableRead()
 {
     if (sock == null)
     {
         throw new Exception("TcpTransport: Attempted to enable read before setSocket called");
     }
     if (!sock.Connected)
     {
         close();
     }
     lock (close_mutex)
     {
         if (closed)
         {
             return;
         }
     }
     if (!expecting_read && poll_set != null)
     {
         //Console.WriteLine("ENABLE READ:   " + Topic + "(" + sock.FD + ")");
         expecting_read = true;
         poll_set.addEvents(sock, POLLIN);
     }
 }