All Classes Namespaces Functions Variables Groups Pages
WebSocketUtil Module

# Introduction to the WebSocketUtil Module

The WebSocketUtil module provides common client and server support for RFC-6455 based WebSocket protocol implementations in Qore.

This module is used by the following modules:

- WebSocketClient: provides an event-driven client API for connecting to WebSocket servers
- WebSocketHandler: provides an interface to the Qore HttpServer module for implementing server-side WebSocket services

To use this module directly, use `"%requires WebSocketClient"` in your code, otherwise it's recommended to use one of the higher-level module listed above.

The main functionality provided by this module:

- WebSocketUtil::ws_encode_message(): encodes messages for sending over a websocket connection
- WebSocketUtil::ws_read_message(): reads and decodes messages from a websocket connection
- WebSocket Close Codes
- WebSocket OpCodes

# WebSocketUtil Module Release History

## v1.4

- added the WebSocketUtil::ws_get_response_key() function

## v1.3

- added timeout values to Socket calls (issue 1725)

## v1.2

- fixed a bug parsing and generating the websocket close status code (issue 1216)

## v1.1

- converted to %new-style

## v1.0

- the initial version of the WebSocketUtil module