AsyncSocket.receiveMessage

Submits an asynchronous request on this socket to receive a message. Upon successful reception onReceive will be called with the received data. exact indicates whether successful reception requires the entire buffer provided within message to have been filled. If a socket error occurs, but some data has already been received, then onReceive will be called with that partial data regardless of exact. The message must have been allocated using NetworkMessage.alloc and will be freed with NetworkMessage.free after the completion callback returns, or once an error occurs that prevents said callback from being called.

  1. void receiveMessage(NetworkMessage* message, AsyncReceiveRequest.OnComplete onReceive, bool exact)
    class AsyncSocket
    package nothrow
    void
    receiveMessage
  2. void receiveMessage(NetworkMessage message, AsyncReceiveRequest.OnDataReceived onReceive, bool exact)

Meta