TAsyncSocketManager.addOneshotListener

Adds a listener that is triggered once when an event of the specified type occurs, and removed afterwards.

  1. void addOneshotListener(Socket socket, TAsyncEventType eventType, Duration timeout, TSocketEventListener listener)
  2. void addOneshotListener(Socket socket, TAsyncEventType eventType, TSocketEventListener listener)
    interface TAsyncSocketManager

Parameters

socket Socket

The socket to listen for events at.

eventType TAsyncEventType

The type of the event to listen for.

listener TSocketEventListener

The delegate to call when an event happened.

Meta