return (const char *)context->canonical_hostname;
}
-int user_callback_handle_rxflow(callback_function callback_function,
+int user_callback_handle_rxflow(lws_callback_function callback_function,
struct lws *wsi,
enum lws_callback_reasons reason, void *user,
void *in, size_t len)
struct lws_extension;
/**
- * callback_function() - User server actions
+ * typedef lws_callback_function() - User server actions
* @wsi: Opaque websocket instance pointer
* @reason: The reason for the call
* @user: Pointer to per-session user data allocated by library
* connection. If you return nonzero lws will just close the
* connection.
*/
-LWS_VISIBLE LWS_EXTERN int
-callback(const struct lws *wsi, enum lws_callback_reasons reason, void *user,
- void *in, size_t len);
-
typedef int
-(callback_function)(struct lws *wsi, enum lws_callback_reasons reason,
+lws_callback_function(struct lws *wsi, enum lws_callback_reasons reason,
void *user, void *in, size_t len);
#ifndef LWS_NO_EXTENSIONS
/**
- * extension_callback_function() - Hooks to allow extensions to operate
+ * typedef lws_extension_callback_function() - Hooks to allow extensions to operate
* @context: Websockets context
* @ext: This extension
* @wsi: Opaque websocket instance pointer
* buffer safely, it should copy the data into its own buffer and
* set the lws_tokens token pointer to it.
*/
-LWS_VISIBLE LWS_EXTERN int
-extension_callback(struct lws_context *context, const struct lws_extension *ext,
- struct lws *wsi, enum lws_extension_callback_reasons reason,
- void *user, void *in, size_t len);
-
typedef int
-(extension_callback_function)(struct lws_context *context,
+lws_extension_callback_function(struct lws_context *context,
const struct lws_extension *ext, struct lws *wsi,
enum lws_extension_callback_reasons reason,
void *user, void *in, size_t len);
struct lws_protocols {
const char *name;
- callback_function *callback;
+ lws_callback_function *callback;
size_t per_session_data_size;
size_t rx_buffer_size;
unsigned int id;
struct lws_extension {
const char *name;
- extension_callback_function *callback;
+ lws_extension_callback_function *callback;
size_t per_session_data_size;
void *per_context_private_data;
#endif
/**
- * struct lws_context_creation_info: parameters to create context with
+ * struct lws_context_creation_info - parameters to create context with
*
* @port: Port to listen on... you can use CONTEXT_PORT_NO_LISTEN to
* suppress listening on any port, that's what you want if you are
lws_union_transition(struct lws *wsi, enum connection_mode mode);
LWS_EXTERN int
-user_callback_handle_rxflow(callback_function, struct lws *wsi,
+user_callback_handle_rxflow(lws_callback_function, struct lws *wsi,
enum lws_callback_reasons reason, void *user,
void *in, size_t len);
#ifdef LWS_USE_HTTP2
library and in the user code.
</blockquote>
<hr>
-<h2>callback - User server actions</h2>
-<i>LWS_EXTERN int</i>
-<b>callback</b>
-(<i>const struct lws *</i> <b>wsi</b>,
+<h2>lws_callback_function - User server actions</h2>
+<i>typedef int</i>
+<b>lws_callback_function</b>
+(<i>struct lws *</i> <b>wsi</b>,
<i>enum lws_callback_reasons</i> <b>reason</b>,
<i>void *</i> <b>user</b>,
<i>void *</i> <b>in</b>,
connection.
</blockquote>
<hr>
-<h2>extension_callback - Hooks to allow extensions to operate</h2>
-<i>LWS_EXTERN int</i>
-<b>extension_callback</b>
+<h2>lws_extension_callback_function - Hooks to allow extensions to operate</h2>
+<i>typedef int</i>
+<b>lws_extension_callback_function</b>
(<i>struct lws_context *</i> <b>context</b>,
<i>const struct lws_extension *</i> <b>ext</b>,
<i>struct lws *</i> <b>wsi</b>,
<h2>struct lws_protocols - List of protocols and handlers server supports.</h2>
<b>struct lws_protocols</b> {<br>
<i>const char *</i> <b>name</b>;<br>
- <i>callback_function *</i> <b>callback</b>;<br>
+ <i>lws_callback_function *</i> <b>callback</b>;<br>
<i>size_t</i> <b>per_session_data_size</b>;<br>
<i>size_t</i> <b>rx_buffer_size</b>;<br>
<i>unsigned int</i> <b>id</b>;<br>
<h2>struct lws_extension - An extension we know how to cope with</h2>
<b>struct lws_extension</b> {<br>
<i>const char *</i> <b>name</b>;<br>
- <i>extension_callback_function *</i> <b>callback</b>;<br>
+ <i>lws_extension_callback_function *</i> <b>callback</b>;<br>
<i>size_t</i> <b>per_session_data_size</b>;<br>
<i>void *</i> <b>per_context_private_data</b>;<br>
};<br>
all sessions, etc, if it wants
</dl>
<hr>
-<h2>struct lws_context_creation_info - </h2>
+<h2>struct lws_context_creation_info - parameters to create context with</h2>
<b>struct lws_context_creation_info</b> {<br>
<i>int</i> <b>port</b>;<br>
<i>const char *</i> <b>iface</b>;<br>