onMessage

abstract fun onMessage(buffer: DataChannel.Buffer)

A data buffer was successfully received. NOTE: `buffer.data` will be freed once this function returns so callers who want to use the data asynchronously must make sure to copy it first.