Connector.write

Callback function invoked when Session wants to send data to the remote peer. The implementation of this function must send at most |data.length| bytes of data stored in |data|. It must return the number of bytes sent if it succeeds. If it cannot send any single byte without blocking, it must return ErrorCode.WOULDBLOCK. For other errors, it must return ErrorCode.CALLBACK_FAILURE.

This callback is required if the application uses Session.send to send data to the remote endpoint. If the application uses solely Session.memSend instead, this callback function is unnecessary.

class Connector
int
write
(
in ubyte[] data
)

Meta