diff options
author | Matt Jordan <mjordan@digium.com> | 2015-05-13 09:55:58 -0500 |
---|---|---|
committer | Matt Jordan <mjordan@digium.com> | 2015-05-19 19:59:45 -0500 |
commit | 31cc24aad603716e7ef68b384faebd14e0dfa460 (patch) | |
tree | 6da4e0e4e654218029325f130de6483d83e9d4a6 /res/res_agi.c | |
parent | f9114179e6bc727cd9fe593d50313c19b6e63492 (diff) |
res/res_http_websocket: Add a pre-session established callback
This patch updates http_websocket and its corresponding implementation
with a pre-session established callback. This callback allows for
WebSocket server consumers to be notified when a WebSocket connection is
attempted, but before we accept it. Consumers can choose to reject the
connection, if their application specific logic allows for it.
As a result, this patch pulls out the previously private
websocket_protocol struct and makes it public, as
ast_websocket_protocol. In order to preserve backwards compatibility
with existing modules, the existing APIs were left as-is, and new APIs
were added for the creation of the ast_websocket_protocol as well as for
adding a sub-protocol to a WebSocket server.
In particular, the following new API calls were added:
* ast_websocket_add_protocol2 - add a protocol to the core WebSocket
server
* ast_websocket_server_add_protocol2 - add a protocol to a specific
WebSocket server
* ast_websocket_sub_protocol_alloc - allocate a sub-protocol object.
Consumers can populate this with whatever callbacks they wish to
support, then add it to the core server or a specified server.
ASTERISK-24988
Reported by: Joshua Colp
Change-Id: Ibe0bbb30c17eec6b578071bdbd197c911b620ab2
Diffstat (limited to 'res/res_agi.c')
0 files changed, 0 insertions, 0 deletions