Datachannel.sendMessage()

DESCRIPTION

Send a message on this datachannel

If the datachannel is not open or sending fails, eg. because the client closed the connection, the message is dropped. This function does not throw exceptions.

DECLARATION

void sendMessage(const uint8_t* buffer, size_t length, enum MessageType type = MESSAGE_TYPE_BINARY)

PARAMETERS

buffer:
[in] Data buffer to send
length:
[in] Length of data buffer
type:
[in] Type of message to send