Added code.
This commit is contained in:
25
server/src/include/chat.h
Normal file
25
server/src/include/chat.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef CHAT_H
|
||||
#define CHAT_H
|
||||
|
||||
#include <libwebsockets.h>
|
||||
|
||||
/**
|
||||
* cb_chat - libwebsockets protocol callback for COMS chat.
|
||||
*
|
||||
* This function is registered in the protocols array passed to the
|
||||
* lws_context and handles connection, receive, writable, and close events.
|
||||
*
|
||||
* @wsi: The WebSocket instance pointer
|
||||
* @reason: One of the LWS_CALLBACK_* reasons
|
||||
* @user: Pointer to a session_t* for this connection
|
||||
* @in: Pointer to incoming data (for receive events)
|
||||
* @len: Length of the incoming data buffer
|
||||
*
|
||||
* Return: 0 on success, non-zero on error.
|
||||
*/
|
||||
int cb_chat(
|
||||
struct lws* wsi, enum lws_callback_reasons reason, void* user, void* in,
|
||||
size_t len
|
||||
);
|
||||
|
||||
#endif // CHAT_H
|
||||
Reference in New Issue
Block a user