SocketSelector.add

Add a new TcpSocket to the selector.

This function keeps a weak reference to the socket, so you have to make sure that the socket is not destroyed while it is stored in the selector. This function does nothing if the socket is not valid.

  1. void add(TcpListener listener)
  2. void add(TcpSocket socket)
    class SocketSelector
    void
    add
  3. void add(UdpSocket socket)

Parameters

socket
Type: TcpSocket

Reference to the socket to add

Meta