addEvents() public method

public addEvents ( Ros_CSharp.CustomSocket.Socket s, int events ) : bool
s Ros_CSharp.CustomSocket.Socket
events int
return bool
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }