# cp.websocket.event

The set of event types received from websocket connections.


# API Overview

Constants - Useful values which cannot be changed

  • closed
  • closing
  • error
  • message
  • opened
  • opening

# API Documentation

# Constants

# closed

Signature cp.websocket.event.closed <string>
Type Constant
Description The socket has closed.
Notes None
Source src/extensions/cp/websocket/event.lua line 17

# closing

Signature cp.websocket.event.closing <string>
Type Constant
Description The socket is attempting to close.
Notes None
Source src/extensions/cp/websocket/event.lua line 13

# error

Signature cp.websocket.event.error <string>
Type Constant
Description There was an error. The connection may still be open.
Notes None
Source src/extensions/cp/websocket/event.lua line 21

# message

Signature cp.websocket.event.message <string>
Type Constant
Description The socket has sent a message.
Notes None
Source src/extensions/cp/websocket/event.lua line 25

# opened

Signature cp.websocket.event.opened <string>
Type Constant
Description The socket has opened.
Notes None
Source src/extensions/cp/websocket/event.lua line 9

# opening

Signature cp.websocket.event.opening <string>
Type Constant
Description The socket is attempting to open.
Notes None
Source src/extensions/cp/websocket/event.lua line 5