src/libs/ulfius/lib_websocket.c
/**
 * Ulfius main callback function that simply calls the websocket manager and closes
 */
Ulfius main callback function that simply calls the websocket manager and closes
Ulfius main callback function that simply calls the websocket manager and closes
int websocket_cb(const struct _u_request * request, struct _u_response * response, void * user_data) {
  char * websocket_user_data = o_strdup("my_user_data");
  int ret;
  if ((ret = ulfius_set_websocket_response(response, NULL, NULL, &websocket_manager_callback, websocket_user_data, &websocket_incoming_message_callback, websocket_user_data, &websocket_onclose_callback, websocket_user_data)) == U_OK) {
    return U_CALLBACK_CONTINUE;
  } else {
    return U_CALLBACK_ERROR;
  }
}
int websocket_cb ( const struct _u_request * request , struct _u_response * response , void * user_data ) { char * websocket_user_data = o_strdup ( " " ) ; int ret ; if ( ( ret = ulfius_set_websocket_response ( response , NULL , NULL , & websocket_manager_callback , websocket_user_data , & websocket_incoming_message_callback , websocket_user_data , & websocket_onclose_callback , websocket_user_data ) ) == U_OK ) { return U_CALLBACK_CONTINUE ; } else { return U_CALLBACK_ERROR ; } }
Ulfius main callback function that simply calls the websocket manager and closes
Ulfius main callback function that simply calls the websocket manager and closes