Home
last modified time | relevance | path

Searched refs:LWS_PRE (Results 1 – 25 of 88) sorted by relevance

1234

/external/libwebsockets/lib/core-net/
Ddummy-callback.c53 char buf[LWS_PRE + 6], *out = buf + LWS_PRE; in stream_close()
61 if (lws_write(wsi, (unsigned char *)buf + LWS_PRE, 0, in stream_close()
75 if (lws_write(wsi, (unsigned char *)buf + LWS_PRE, 5, in stream_close()
156 pkt = lws_zalloc(sizeof(*pkt) + LWS_PRE + len, __func__); in lws_callback_ws_proxy()
165 memcpy(((uint8_t *)&pkt[1]) + LWS_PRE, in, len); in lws_callback_ws_proxy()
178 LWS_PRE, pkt->len, lws_write_ws_flags( in lws_callback_ws_proxy()
200 pkt = lws_zalloc(sizeof(*pkt) + LWS_PRE + len, __func__); in lws_callback_ws_proxy()
209 memcpy(((uint8_t *)&pkt[1]) + LWS_PRE, in, len); in lws_callback_ws_proxy()
222 LWS_PRE, pkt->len, lws_write_ws_flags( in lws_callback_ws_proxy()
262 char buf[LWS_PRE + 32 + 8192]; in lws_callback_http_dummy()
[all …]
/external/libwebsockets/plugins/ssh-base/
Dtelnet.c128 uint8_t buf[LWS_PRE + 800], *pu = in; in lws_callback_raw_telnet()
197 memcpy(buf + LWS_PRE, init, sizeof(init)); in lws_callback_raw_telnet()
207 pu = buf + LWS_PRE + 400; in lws_callback_raw_telnet()
209 ((int)sizeof(buf) - LWS_PRE - n - 401) / 2); in lws_callback_raw_telnet()
217 buf[LWS_PRE + n++] = 0xff; in lws_callback_raw_telnet()
218 buf[LWS_PRE + n++] = *pu++; in lws_callback_raw_telnet()
222 m = lws_write(wsi, (unsigned char *)buf + LWS_PRE, n, in lws_callback_raw_telnet()
/external/libwebsockets/minimal-examples/http-server/minimal-http-server-custom-headers/
Dminimal-http-server-custom-headers.c26 char result[128 + LWS_PRE];
39 uint8_t buf[LWS_PRE + 2048], *start = &buf[LWS_PRE], *p = start, in callback_http()
40 *end = &buf[sizeof(buf) - LWS_PRE - 1]; in callback_http()
42 char value[32], *pr = &pss->result[LWS_PRE]; in callback_http()
43 int n, e = sizeof(pss->result) - LWS_PRE; in callback_http()
/external/libwebsockets/lib/system/ntpclient/
Dntpclient.c128 uint8_t pkt[LWS_PRE + 48]; in callback_ntpc()
253 memset(pkt + LWS_PRE, 0, sizeof(pkt) - LWS_PRE); in callback_ntpc()
254 pkt[LWS_PRE] = (LWSNTPC_LI_NONE << 6) | in callback_ntpc()
258 if (lws_write(wsi, pkt + LWS_PRE, sizeof(pkt) - LWS_PRE, 0) == in callback_ntpc()
259 sizeof(pkt) - LWS_PRE) in callback_ntpc()
/external/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads-smp/
Dprotocol_lws_minimal.c102 amsg.payload = malloc(LWS_PRE + len); in thread_spam()
107 n = lws_snprintf((char *)amsg.payload + LWS_PRE, len, in thread_spam()
151 char temp[LWS_PRE + 256]; in callback_minimal()
233 n = lws_snprintf(temp + LWS_PRE, sizeof(temp) - LWS_PRE, in callback_minimal()
235 (char *)pmsg->payload + LWS_PRE); in callback_minimal()
238 m = lws_write(wsi, (unsigned char *)temp + LWS_PRE, n, in callback_minimal()
/external/libwebsockets/lib/abstract/protocols/smtp/
Dsmtp.c239 char b[256 + LWS_PRE], *p = b + LWS_PRE; in lws_smtpc_abs_writeable()
252 n = lws_snprintf(p, sizeof(b) - LWS_PRE, "HELO %s\n", c->helo); in lws_smtpc_abs_writeable()
257 n = lws_snprintf(p, sizeof(b) - LWS_PRE, "MAIL FROM: <%s>\n", in lws_smtpc_abs_writeable()
263 n = lws_snprintf(p, sizeof(b) - LWS_PRE, in lws_smtpc_abs_writeable()
269 n = lws_snprintf(p, sizeof(b) - LWS_PRE, "DATA\n"); in lws_smtpc_abs_writeable()
280 n = lws_snprintf(p, sizeof(b) - LWS_PRE, "quit\n"); in lws_smtpc_abs_writeable()
/external/libwebsockets/plugins/
Dprotocol_esp32_lws_ota.c33 char result[LWS_PRE + 512];
178 unsigned char buf[LWS_PRE + 384], *start = buf + LWS_PRE - 1, *p = start, in callback_esplws_ota()
226 pss->result_len = snprintf(pss->result + LWS_PRE, sizeof(pss->result) - LWS_PRE - 1, in callback_esplws_ota()
252 n = lws_write(wsi, (unsigned char *)pss->result + LWS_PRE, in callback_esplws_ota()
Dprotocol_post_demo.c39 char result[LWS_PRE + LWS_RECOMMENDED_MIN_HEADER_SPACE];
127 p = (unsigned char *)pss->result + LWS_PRE; in format_result()
129 end = p + sizeof(pss->result) - LWS_PRE - 1; in format_result()
205 p = (unsigned char *)pss->result + LWS_PRE; in callback_post_demo()
207 end = p + sizeof(pss->result) - LWS_PRE - 1; in callback_post_demo()
Dprotocol_dumb_increment.c48 uint8_t buf[LWS_PRE + 20], *p = &buf[LWS_PRE]; in callback_dumb_increment()
72 n = lws_snprintf((char *)p, sizeof(buf) - LWS_PRE, "%d", in callback_dumb_increment()
Dprotocol_lws_server_status.c64 char contents[256], pure[256], *p = v->d.buf + LWS_PRE, in update()
65 *end = v->d.buf + sizeof(v->d.buf) - LWS_PRE - 1; in update()
97 v->d.length = p - (v->d.buf + LWS_PRE); in update()
190 m = lws_write(wsi, (unsigned char *)v->d.buf + LWS_PRE, in callback_lws_server_status()
/external/libwebsockets/test-apps/
Dtest-client.c125 char which_wsi[10], buf[50 + LWS_PRE]; in callback_dumb_increment()
214 char buffer[1024 + LWS_PRE]; in callback_dumb_increment()
215 char *px = buffer + LWS_PRE; in callback_dumb_increment()
216 int lenx = sizeof(buffer) - LWS_PRE; in callback_dumb_increment()
260 strcpy(buf + LWS_PRE, "text=hello&send=Send+the+form"); in callback_dumb_increment()
261 n = lws_write(wsi, (unsigned char *)&buf[LWS_PRE], in callback_dumb_increment()
262 strlen(&buf[LWS_PRE]), LWS_WRITE_HTTP); in callback_dumb_increment()
321 unsigned char buf[LWS_PRE + block_size], *p; in callback_lws_mirror()
379 buf[LWS_PRE + n] = lws_poly_rand(&tx); in callback_lws_mirror()
381 n = lws_write(wsi, &buf[LWS_PRE], block_size, in callback_lws_mirror()
[all …]
/external/libwebsockets/lib/roles/mqtt/
Dops-mqtt.c285 uint8_t buf[LWS_PRE + 2]; in rops_handle_POLLOUT_mqtt()
296 buf[LWS_PRE] = LMQCP_CTOS_PINGREQ << 4; in rops_handle_POLLOUT_mqtt()
297 buf[LWS_PRE + 1] = 0; in rops_handle_POLLOUT_mqtt()
299 if (lws_write(wsi, (uint8_t *)&buf[LWS_PRE], 2, in rops_handle_POLLOUT_mqtt()
353 uint8_t buf[LWS_PRE + 4]; in rops_handle_POLLOUT_mqtt()
358 buf[LWS_PRE] = LMQCP_PUBACK << 4; in rops_handle_POLLOUT_mqtt()
360 buf[LWS_PRE + 1] = 2; in rops_handle_POLLOUT_mqtt()
362 lws_ser_wu16be(&buf[LWS_PRE + 2], wsi->mqtt->ack_pkt_id); in rops_handle_POLLOUT_mqtt()
364 if (lws_write(wsi, (uint8_t *)&buf[LWS_PRE], 4, in rops_handle_POLLOUT_mqtt()
/external/libwebsockets/lib/secure-streams/protocols/
Dss-ws.c32 uint8_t buf[LWS_PRE + 1400]; in secstream_ws()
100 buflen = sizeof(buf) - LWS_PRE; in secstream_ws()
101 if (h->info.tx(ss_to_userobj(h), h->txord++, buf + LWS_PRE, in secstream_ws()
110 if (lws_write(wsi, buf + LWS_PRE, buflen, f1) != (int)buflen) { in secstream_ws()
Dss-h1.c163 uint8_t buf[LWS_PRE + 1520], *p = &buf[LWS_PRE], in secstream_h1()
408 char *px = (char *)buf + LWS_PRE; /* guarantees LWS_PRE */ in secstream_h1()
409 int lenx = sizeof(buf) - LWS_PRE; in secstream_h1()
489 if (!f && !lws_ptr_diff(p, buf + LWS_PRE)) in secstream_h1()
496 lws_ptr_diff(p, buf + LWS_PRE), f); in secstream_h1()
498 if (lws_write(wsi, buf + LWS_PRE, lws_ptr_diff(p, buf + LWS_PRE), in secstream_h1()
499 LWS_WRITE_HTTP) != (int)lws_ptr_diff(p, buf + LWS_PRE)) { in secstream_h1()
Dss-mqtt.c33 uint8_t buf[LWS_PRE + 1400]; in secstream_mqtt()
145 buflen = sizeof(buf) - LWS_PRE; in secstream_mqtt()
146 if (h->info.tx(ss_to_userobj(h), h->txord++, buf + LWS_PRE, in secstream_mqtt()
155 mqpp.payload = buf + LWS_PRE; in secstream_mqtt()
166 (const char *)buf + LWS_PRE, buflen, in secstream_mqtt()
/external/libwebsockets/minimal-examples/http-server/minimal-http-server-h2-long-poll/
Dminimal-http-server.c58 uint8_t buf[LWS_PRE + LWS_RECOMMENDED_MIN_HEADER_SPACE], in callback_http()
59 *start = &buf[LWS_PRE], *p = start, in callback_http()
60 *end = p + sizeof(buf) - LWS_PRE; in callback_http()
89 n = lws_snprintf((char *)p, sizeof(buf) - LWS_PRE, "%llu", in callback_http()
/external/libwebsockets/minimal-examples/ws-server/minimal-ws-server-pmd-corner/
Dprotocol_lws_minimal.c220 unsigned char buf[LWS_PRE + 2048]; in callback_minimal()
243 memcpy(buf + LWS_PRE, uncompressible, in callback_minimal()
247 m = lws_write(wsi, buf + LWS_PRE, corner_lengths[pss->last - 1], in callback_minimal()
/external/libwebsockets/minimal-examples/http-client/minimal-http-client-post/
Dminimal-http-client-post.c32 char buf[LWS_PRE + 1024], *start = &buf[LWS_PRE], *p = start, in callback_http()
33 *end = &buf[sizeof(buf) - LWS_PRE - 1]; in callback_http()
71 n = sizeof(buf) - LWS_PRE; in callback_http()
/external/libwebsockets/lib/core/
Dbuflist.c63 len + LWS_PRE + 1, __func__); in lws_buflist_append_segment()
74 p = (uint8_t *)nbuf + sizeof(*nbuf) + LWS_PRE; in lws_buflist_append_segment()
133 *buf = ((uint8_t *)b) + sizeof(*b) + b->pos + LWS_PRE; in lws_buflist_next_segment_len()
188 memcpy(buf, ((uint8_t *)&p[1]) + LWS_PRE + ofs, s); in lws_buflist_linear_copy()
/external/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threadpool/
Dprotocol_lws_minimal_threadpool.c122 lws_snprintf(priv->result + LWS_PRE, in task_function()
123 sizeof(priv->result) - LWS_PRE, in task_function()
279 n = strlen(priv->result + LWS_PRE); in callback_minimal()
280 m = lws_write(wsi, (unsigned char *)priv->result + LWS_PRE, in callback_minimal()
/external/libwebsockets/minimal-examples/http-client/minimal-http-client-multi/
Dminimal-http-client-multi.c60 char buf[LWS_PRE + 1024], *start = &buf[LWS_PRE], *p = start, in callback_http()
61 *end = &buf[sizeof(buf) - LWS_PRE - 1]; in callback_http()
101 char buffer[1024 + LWS_PRE]; in callback_http()
102 char *px = buffer + LWS_PRE; in callback_http()
103 int lenx = sizeof(buffer) - LWS_PRE; in callback_http()
/external/libwebsockets/lib/roles/ws/
Dops-ws.c392 if (wsi->ws->rx_ubuf_head + LWS_PRE >= wsi->ws->rx_ubuf_alloc) { in lws_ws_rx_sm()
398 wsi->ws->rx_ubuf[LWS_PRE + in lws_ws_rx_sm()
401 wsi->ws->rx_ubuf[LWS_PRE + in lws_ws_rx_sm()
450 pp = &wsi->ws->rx_ubuf[LWS_PRE]; in lws_ws_rx_sm()
504 &wsi->ws->rx_ubuf[LWS_PRE], in lws_ws_rx_sm()
534 memcpy(wsi->ws->ping_payload_buf + LWS_PRE, in lws_ws_rx_sm()
535 &wsi->ws->rx_ubuf[LWS_PRE], in lws_ws_rx_sm()
549 lwsl_hexdump(&wsi->ws->rx_ubuf[LWS_PRE], in lws_ws_rx_sm()
584 pmdrx.eb_in.token = &wsi->ws->rx_ubuf[LWS_PRE]; in lws_ws_rx_sm()
842 n += LWS_PRE; in lws_server_init_wsi_for_ws()
[all …]
/external/libwebsockets/minimal-examples/ws-client/minimal-ws-client-spam/
Dminimal-ws-client-spam.c82 uint8_t ping[LWS_PRE + 125]; in callback_minimal_spam()
143 n = lws_snprintf((char *)ping + LWS_PRE, sizeof(ping) - LWS_PRE, in callback_minimal_spam()
146 m = lws_write(wsi, ping + LWS_PRE, n, LWS_WRITE_TEXT); in callback_minimal_spam()
/external/libwebsockets/minimal-examples/http-client/minimal-http-client-hugeurl/
Dminimal-http-client-hugeurl.c103 char buffer[1024 + LWS_PRE]; in callback_http()
104 char *px = buffer + LWS_PRE; in callback_http()
105 int lenx = sizeof(buffer) - LWS_PRE; in callback_http()
/external/libwebsockets/minimal-examples/ws-server/minimal-ws-server-pmd/
Dprotocol_lws_minimal.c112 LWS_PRE, vhd->amsg.len, LWS_WRITE_TEXT); in callback_minimal()
127 vhd->amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
133 memcpy((char *)vhd->amsg.payload + LWS_PRE, in, len); in callback_minimal()

1234