Object function reference

on_close

A reference entry for on_close

Object function · Socket

on_close(function function) ⇒ boolean

Registers a callback that is called when a WebSocket connection closes. The callback receives the numeric close code and the close reason as a string.