SocketSelector.isReady

Test a socket to know if it is ready to receive data.

This function must be used after a call to Wait, to know which sockets are ready to receive data. If a socket is ready, a call to receive will never block because we know that there is data available to read. Note that if this function returns true for a TcpListener, this means that it is ready to accept a new connection.

  1. bool isReady(TcpListener listener)
    class SocketSelector
    bool
    isReady
  2. bool isReady(TcpSocket socket)
  3. bool isReady(UdpSocket socket)

Meta