SocketSelector.add

Add a new UdpSocket 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)
  3. void add(UdpSocket socket)
    class SocketSelector
    void
    add

Parameters

socket
Type: UdpSocket

Reference to the socket to add

Meta