Object function reference

on_message

A reference entry for on_message

Object function · Socket

on_message(function function) ⇒ boolean

Registers a callback that is called with each received WebSocket text message. The callback receives the message as a string. Messages remain available to read() as well.