Asterisk - The Open Source Telephony Project  18.5.0
Data Fields
ast_websocket Struct Reference

Structure definition for session. More...

Collaboration diagram for ast_websocket:
Collaboration graph
[legend]

Data Fields

char buf [MAXIMUM_FRAME_SIZE]
 
struct websocket_clientclient
 
unsigned int close_sent:1
 
uint16_t close_status_code
 
unsigned int closing:1
 
struct ast_sockaddr local_address
 
enum ast_websocket_opcode opcode
 
char * payload
 
size_t payload_len
 
size_t reconstruct
 
struct ast_sockaddr remote_address
 
unsigned int secure:1
 
char session_id [AST_UUID_STR_LEN]
 
struct ast_iostreamstream
 
int timeout
 

Detailed Description

Structure definition for session.

Definition at line 88 of file res_http_websocket.c.

Field Documentation

◆ buf

char buf[MAXIMUM_FRAME_SIZE]

◆ client

struct websocket_client* client

◆ close_sent

unsigned int close_sent

Bit to indicate that the session close opcode has been sent and no further data will be sent

Definition at line 99 of file res_http_websocket.c.

Referenced by ast_websocket_close().

◆ close_status_code

uint16_t close_status_code

Status code sent in a CLOSE frame upon shutdown

Definition at line 102 of file res_http_websocket.c.

Referenced by ast_websocket_read(), and session_destroy_fn().

◆ closing

unsigned int closing

Bit to indicate that the session is in the process of being closed

Definition at line 98 of file res_http_websocket.c.

Referenced by ast_websocket_close(), ast_websocket_fd(), ast_websocket_read(), ast_websocket_wait_for_input(), ast_websocket_write(), and ws_safe_read().

◆ local_address

struct ast_sockaddr local_address

Our local address

Definition at line 91 of file res_http_websocket.c.

Referenced by ast_websocket_local_address(), and ast_websocket_uri_cb().

◆ opcode

enum ast_websocket_opcode opcode

◆ payload

char* payload

◆ payload_len

size_t payload_len

Length of the payload

Definition at line 93 of file res_http_websocket.c.

Referenced by ast_websocket_read(), ast_websocket_read_string(), and websocket_echo_callback().

◆ reconstruct

size_t reconstruct

Number of bytes before a reconstructed payload will be returned and a new one started

Definition at line 95 of file res_http_websocket.c.

Referenced by ast_websocket_read(), ast_websocket_reconstruct_disable(), ast_websocket_reconstruct_enable(), ast_websocket_uri_cb(), and websocket_client_create().

◆ remote_address

struct ast_sockaddr remote_address

◆ secure

unsigned int secure

Bit to indicate that the transport is secure

Definition at line 97 of file res_http_websocket.c.

Referenced by ast_websocket_is_secure(), ast_websocket_uri_cb(), and websocket_client_connect().

◆ session_id

char session_id[AST_UUID_STR_LEN]

The identifier for the websocket session

Definition at line 101 of file res_http_websocket.c.

Referenced by ast_websocket_session_id(), and ast_websocket_uri_cb().

◆ stream

struct ast_iostream* stream

◆ timeout

int timeout

The timeout for operations on the socket

Definition at line 96 of file res_http_websocket.c.

Referenced by ast_websocket_close(), ast_websocket_set_timeout(), ast_websocket_uri_cb(), ast_websocket_wait_for_input(), and ast_websocket_write().


The documentation for this struct was generated from the following file: