Data Structures | |
struct | websocket_http_client_state |
Macros | |
#define | WEBSOCKET_CONF_MAX_SUBPROTOLEN 30 |
#define | WEBSOCKET_CONF_MAX_URLLEN 80 |
#define | WEBSOCKET_HTTP_CLIENT_BUFSIZE 400 |
#define WEBSOCKET_CONF_MAX_SUBPROTOLEN 30 |
Referenced by websocket_open().
#define WEBSOCKET_CONF_MAX_URLLEN 80 |
#define WEBSOCKET_HTTP_CLIENT_BUFSIZE 400 |
void websocket_http_client_aborted | ( | struct websocket_http_client_state * | s | ) |
References call(), NULL, PRINTF, s, websocket::state, WEBSOCKET_RESET, and WEBSOCKET_STATE_CLOSED.
Referenced by parse_statusline(), and websocket_http_client_appcall().
void websocket_http_client_appcall | ( | void * | state | ) |
References acked(), websocket_http_client_state::file, websocket_http_client_state::host, websocket_http_client_state::httpflag, HTTPFLAG_MOVED, mdns_lookup(), mdns_query(), newdata(), NULL, websocket_http_client_state::outputbuf_sendnext, websocket_http_client_state::outputbufptr, websocket_http_client_state::port, s, senddata(), websocket_http_client_state::state, state, websocket_http_client_state::subprotocol, tcp_markconn, websocket_http_client_state::timer, uip_abort, uip_aborted, uip_acked, uip_appdata, uip_closed, uip_connected, uip_newdata, uip_poll, uip_rexmit, uip_timedout, websocket_http_client_aborted(), websocket_http_client_closed(), websocket_http_client_datahandler(), websocket_http_client_get(), WEBSOCKET_HTTP_CLIENT_STATE_CLOSE, WEBSOCKET_HTTP_CLIENT_STATE_STATUSLINE, websocket_http_client_timedout(), and WEBSOCKET_HTTP_CLIENT_TIMEOUT.
Referenced by PROCESS_THREAD().
void websocket_http_client_close | ( | struct websocket_http_client_state * | s | ) |
References websocket_http_client_state::state, and WEBSOCKET_HTTP_CLIENT_STATE_CLOSE.
Referenced by websocket_close(), and websocket_http_client_datahandler().
void websocket_http_client_closed | ( | struct websocket_http_client_state * | s | ) |
References call(), NULL, PRINTF, s, websocket::state, WEBSOCKET_CLOSED, and WEBSOCKET_STATE_CLOSED.
Referenced by websocket_http_client_appcall().
void websocket_http_client_connected | ( | struct websocket_http_client_state * | s | ) |
References call(), NULL, PRINTF, s, websocket::state, WEBSOCKET_CONNECTED, and WEBSOCKET_STATE_WAITING_FOR_HEADER.
Referenced by acked().
void websocket_http_client_datahandler | ( | struct websocket_http_client_state * | s, |
uint8_t * | data, | ||
uint16_t | len | ||
) |
References call(), websocket_frame_hdr::extlen, websocket::headercache, websocket::headercacheptr, websocket_frame_hdr::len, websocket::len, len, websocket_frame_mask::mask, websocket::mask, MIN, NULL, websocket_frame_hdr::opcode, websocket::opcode, PRINTF, receive_header_byte(), websocket::s, s, websocket::state, WEBSOCKET_CLOSED, WEBSOCKET_DATA, WEBSOCKET_DATA_RECEIVED, websocket_http_client_close(), websocket_http_client_datahandler(), websocket_http_client_send(), WEBSOCKET_LEN_MASK, WEBSOCKET_MASK_BIT, WEBSOCKET_OPCODE_BIN, WEBSOCKET_OPCODE_CLOSE, WEBSOCKET_OPCODE_MASK, WEBSOCKET_OPCODE_PING, WEBSOCKET_OPCODE_PONG, WEBSOCKET_OPCODE_TEXT, WEBSOCKET_PINGED, WEBSOCKET_PONG_RECEIVED, WEBSOCKET_STATE_HEADER_RECEIVED, WEBSOCKET_STATE_RECEIVING_DATA, WEBSOCKET_STATE_RECEIVING_HEADER, and WEBSOCKET_STATE_WAITING_FOR_HEADER.
Referenced by newdata(), websocket_http_client_appcall(), and websocket_http_client_datahandler().
char* websocket_http_client_filename | ( | struct websocket_http_client_state * | s | ) |
References websocket_http_client_state::file.
unsigned char websocket_http_client_get | ( | struct websocket_http_client_state * | s, |
const char * | host, | ||
uint16_t | port, | ||
const char * | file, | ||
const char * | subprotocol | ||
) |
References conn, websocket_http_client_state::conn, websocket_http_client_state::file, websocket_http_client_state::host, init_connection(), ip64_addr_4to6(), ipaddr, mdns_lookup(), NULL, websocket_http_client_state::port, port, strncpy(), websocket_http_client_state::subprotocol, tcp_connect(), tcp_markconn, uip_htons(), uiplib_ip4addrconv(), and uiplib_ip6addrconv().
Referenced by start_get(), and websocket_http_client_appcall().
char* websocket_http_client_hostname | ( | struct websocket_http_client_state * | s | ) |
References websocket_http_client_state::host.
void websocket_http_client_init | ( | void | ) |
char* websocket_http_client_mimetype | ( | struct websocket_http_client_state * | s | ) |
References websocket_http_client_state::mimetype.
unsigned short websocket_http_client_port | ( | struct websocket_http_client_state * | s | ) |
References websocket_http_client_state::port.
uint16_t websocket_http_client_send | ( | struct websocket_http_client_state * | s, |
const uint8_t * | data, | ||
uint16_t | datalen | ||
) |
References websocket_http_client_state::conn, len, MIN, websocket_http_client_state::outputbuf, websocket_http_client_state::outputbufptr, printf, and tcpip_poll_tcp().
Referenced by send_data(), websocket_http_client_datahandler(), and websocket_ping().
uint16_t websocket_http_client_sendbuflen | ( | struct websocket_http_client_state * | s | ) |
References websocket_http_client_state::outputbuf, and websocket_http_client_state::outputbufptr.
Referenced by send_data(), and websocket_ping().
void websocket_http_client_timedout | ( | struct websocket_http_client_state * | s | ) |
References call(), NULL, PRINTF, s, websocket::state, WEBSOCKET_STATE_CLOSED, and WEBSOCKET_TIMEDOUT.
Referenced by websocket_http_client_appcall().