diff options
author | Andy Green <andy@warmcat.com> | 2011-03-06 13:15:31 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2011-03-06 13:15:31 +0000 |
commit | 2366b1c997804d792588247095b4370fd3ee2231 (patch) | |
tree | 55cdd0bdc7c5c4d23d50fc231cd34a07776b7b47 /lib/libwebsockets.h | |
parent | c6517fa2ad3ffa69a04194f971b6cab414f0a243 (diff) |
instantiate extensions server accepted
Signed-off-by: Andy Green <andy@warmcat.com>
Diffstat (limited to 'lib/libwebsockets.h')
-rw-r--r-- | lib/libwebsockets.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 3b2c11a..21b99b1 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -74,6 +74,7 @@ enum libwebsocket_callback_reasons { enum libwebsocket_extension_callback_reasons { LWS_EXT_CALLBACK_CONSTRUCT, + LWS_EXT_CALLBACK_CLIENT_CONSTRUCT, LWS_EXT_CALLBACK_DESTROY, LWS_EXT_CALLBACK_PACKET_RX_PREPARSE, LWS_EXT_CALLBACK_PACKET_TX_PRESEND, @@ -408,11 +409,17 @@ extern int callback(struct libwebsocket_context * context, * extension a chance to initialize its connection context found * in @user. * + * LWS_EXT_CALLBACK_CLIENT_CONSTRUCT: same as LWS_EXT_CALLBACK_CONSTRUCT + * but called when client is instantiating this extension. Some + * extensions will work the same on client and server side and then + * you can just merge handlers for both CONSTRUCTS. + * * LWS_EXT_CALLBACK_DESTROY: called when the connection the extension was * being used on is about to be closed and deallocated. It's the * last chance for the extension to deallocate anything it has * allocated in the user data (pointed to by @user) before the - * user data is deleted. + * user data is deleted. This same callback is used whether you + * are in client or server instantiation context. * * LWS_EXT_CALLBACK_PACKET_RX_PREPARSE: when this extension was active on * a connection, and a packet of data arrived at the connection, |