VSF Documented
__vsf_linux_urihandler_websocket.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_LINUX_HTTPD_WEBSOCKET_H__
19#define __VSF_LINUX_HTTPD_WEBSOCKET_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "kernel/vsf_kernel.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/*============================ MACROS ========================================*/
30/*============================ MACROFIED FUNCTIONS ===========================*/
31/*============================ TYPES =========================================*/
32
47
52 const vsf_linux_httpd_urihandler_websocket_t *websocket_ctx, uint8_t *buf, uint32_t len);
53
54/*============================ GLOBAL VARIABLES ==============================*/
55
57
58/*============================ PROTOTYPES ====================================*/
59
60int vsf_linux_httpd_websocket_write(vsf_linux_httpd_request_t *req, uint8_t *buf, int len, bool is_string);
61
62#ifdef __cplusplus
63}
64#endif
65#endif
66/* EOF */
void(* vsf_linux_httpd_websocket_onerror_t)(vsf_linux_httpd_request_t *req)
Definition __vsf_linux_urihandler_websocket.h:50
void(* vsf_linux_httpd_websocket_onmessage_t)(vsf_linux_httpd_request_t *req, const vsf_linux_httpd_urihandler_websocket_t *websocket_ctx, uint8_t *buf, uint32_t len)
Definition __vsf_linux_urihandler_websocket.h:51
const vsf_linux_httpd_urihandler_op_t vsf_linux_httpd_urihandler_websocket_op
void(* vsf_linux_httpd_websocket_onclose_t)(vsf_linux_httpd_request_t *req)
Definition __vsf_linux_urihandler_websocket.h:49
int vsf_linux_httpd_websocket_write(vsf_linux_httpd_request_t *req, uint8_t *buf, int len, bool is_string)
int(* vsf_linux_httpd_websocket_onopen_t)(vsf_linux_httpd_request_t *req)
Definition __vsf_linux_urihandler_websocket.h:48
Definition vsf_fifo_stream.h:99
Definition vsf_linux_httpd.h:251
unsigned uint32_t
Definition stdint.h:9
unsigned long long uint64_t
Definition stdint.h:11
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_linux_httpd.h:170
Definition __vsf_linux_urihandler_websocket.h:33
uint8_t opcode
Definition __vsf_linux_urihandler_websocket.h:40
vsf_fifo_stream_t stream_in
Definition __vsf_linux_urihandler_websocket.h:34
uint8_t is_start
Definition __vsf_linux_urihandler_websocket.h:41
uint8_t masking_key[4]
Definition __vsf_linux_urihandler_websocket.h:37
uint8_t is_string
Definition __vsf_linux_urihandler_websocket.h:43
uint8_t len_size
Definition __vsf_linux_urihandler_websocket.h:38
uint8_t is_fin
Definition __vsf_linux_urihandler_websocket.h:42
uint8_t masking_pos
Definition __vsf_linux_urihandler_websocket.h:45
uint8_t is_masking
Definition __vsf_linux_urihandler_websocket.h:44
vsf_fifo_stream_t stream_out
Definition __vsf_linux_urihandler_websocket.h:35
uint8_t state
Definition __vsf_linux_urihandler_websocket.h:39
uint64_t payload_len
Definition __vsf_linux_urihandler_websocket.h:36