Home
last modified time | relevance | path

Searched refs:amsg (Results 1 – 14 of 14) sorted by relevance

/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server/
Dprotocol_lws_minimal.c46 struct msg amsg; /* the one pending message... */ member
98 if (!vhd->amsg.payload) in callback_minimal()
105 m = lws_write(wsi, ((unsigned char *)vhd->amsg.payload) + in callback_minimal()
106 LWS_PRE, vhd->amsg.len, LWS_WRITE_TEXT); in callback_minimal()
107 if (m < (int)vhd->amsg.len) { in callback_minimal()
116 if (vhd->amsg.payload) in callback_minimal()
117 __minimal_destroy_message(&vhd->amsg); in callback_minimal()
119 vhd->amsg.len = len; in callback_minimal()
121 vhd->amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
122 if (!vhd->amsg.payload) { in callback_minimal()
[all …]
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-pmd/
Dprotocol_lws_minimal.c46 struct msg amsg; /* the one pending message... */ member
104 if (!vhd->amsg.payload) in callback_minimal()
111 m = lws_write(wsi, ((unsigned char *)vhd->amsg.payload) + in callback_minimal()
112 LWS_PRE, vhd->amsg.len, LWS_WRITE_TEXT); in callback_minimal()
113 if (m < (int)vhd->amsg.len) { in callback_minimal()
122 if (vhd->amsg.payload) in callback_minimal()
123 __minimal_destroy_message(&vhd->amsg); in callback_minimal()
125 vhd->amsg.len = len; in callback_minimal()
127 vhd->amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
128 if (!vhd->amsg.payload) { in callback_minimal()
[all …]
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-echo/
Dprotocol_lws_minimal_server_echo.c70 struct msg amsg; in callback_minimal_server_echo() local
171 amsg.first = (char)lws_is_first_fragment(wsi); in callback_minimal_server_echo()
172 amsg.final = (char)lws_is_final_fragment(wsi); in callback_minimal_server_echo()
173 amsg.binary = (char)lws_frame_is_binary(wsi); in callback_minimal_server_echo()
180 if (amsg.final) in callback_minimal_server_echo()
185 amsg.len = len; in callback_minimal_server_echo()
187 amsg.payload = malloc(LWS_PRE + len); in callback_minimal_server_echo()
188 if (!amsg.payload) { in callback_minimal_server_echo()
193 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal_server_echo()
194 if (!lws_ring_insert(pss->ring, &amsg, 1)) { in callback_minimal_server_echo()
[all …]
/third_party/libwebsockets/minimal-examples/ws-client/minimal-ws-client-echo/
Dprotocol_lws_minimal_client_echo.c109 struct msg amsg; in callback_minimal_client_echo() local
220 amsg.first = (char)lws_is_first_fragment(wsi); in callback_minimal_client_echo()
221 amsg.final = (char)lws_is_final_fragment(wsi); in callback_minimal_client_echo()
222 amsg.binary = (char)lws_frame_is_binary(wsi); in callback_minimal_client_echo()
229 amsg.len = len; in callback_minimal_client_echo()
231 amsg.payload = malloc(LWS_PRE + len); in callback_minimal_client_echo()
232 if (!amsg.payload) { in callback_minimal_client_echo()
237 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal_client_echo()
238 if (!lws_ring_insert(pss->ring, &amsg, 1)) { in callback_minimal_client_echo()
239 __minimal_destroy_message(&amsg); in callback_minimal_client_echo()
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-broker/
Dprotocol_lws_minimal.c87 struct msg amsg; in callback_minimal() local
177 amsg.len = len; in callback_minimal()
179 amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
180 if (!amsg.payload) { in callback_minimal()
185 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal()
186 if (!lws_ring_insert(vhd->ring, &amsg, 1)) { in callback_minimal()
187 __minimal_destroy_message(&amsg); in callback_minimal()
/third_party/libwebsockets/minimal-examples/client-server/minimal-ws-proxy/
Dprotocol_lws_minimal.c99 struct msg amsg; in callback_minimal() local
195 amsg.len = len; in callback_minimal()
197 amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
198 if (!amsg.payload) { in callback_minimal()
203 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal()
204 if (!lws_ring_insert(vhd->ring, &amsg, 1)) { in callback_minimal()
205 __minimal_destroy_message(&amsg); in callback_minimal()
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-ring/
Dprotocol_lws_minimal.c161 struct msg amsg; in callback_minimal() local
241 amsg.len = len; in callback_minimal()
243 amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
244 if (!amsg.payload) { in callback_minimal()
250 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal()
251 if (!lws_ring_insert(vhd->ring, &amsg, 1)) { in callback_minimal()
252 __minimal_destroy_message(&amsg); in callback_minimal()
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads/
Dprotocol_lws_minimal.c85 struct msg amsg; in thread_spam() local
106 amsg.payload = malloc((unsigned int)(LWS_PRE + len)); in thread_spam()
107 if (!amsg.payload) { in thread_spam()
111 n = lws_snprintf((char *)amsg.payload + LWS_PRE, (unsigned int)len, in thread_spam()
114 amsg.len = (unsigned int)n; in thread_spam()
115 n = (int)lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
117 __minimal_destroy_message(&amsg); in thread_spam()
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads-smp/
Dprotocol_lws_minimal.c85 struct msg amsg; in thread_spam() local
106 amsg.payload = malloc((unsigned int)(LWS_PRE + len)); in thread_spam()
107 if (!amsg.payload) { in thread_spam()
111 n = lws_snprintf((char *)amsg.payload + LWS_PRE, (unsigned int)len, in thread_spam()
114 amsg.len = (unsigned int)n; in thread_spam()
115 n = (int)lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
117 __minimal_destroy_message(&amsg); in thread_spam()
/third_party/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads-foreign-libuv-smp/
Dprotocol_lws_minimal.c89 struct msg amsg; in thread_spam() local
110 amsg.payload = malloc((unsigned int)(LWS_PRE + len)); in thread_spam()
111 if (!amsg.payload) { in thread_spam()
115 n = lws_snprintf((char *)amsg.payload + LWS_PRE, (unsigned int)len, in thread_spam()
118 amsg.len = (unsigned int)n; in thread_spam()
119 n = (int)lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
121 __minimal_destroy_message(&amsg); in thread_spam()
/third_party/libwebsockets/minimal-examples/http-server/minimal-http-server-sse-ring/
Dminimal-http-server-sse-ring.c94 struct msg amsg; in thread_spam() local
115 amsg.payload = malloc((unsigned int)len); in thread_spam()
116 if (!amsg.payload) { in thread_spam()
120 n = lws_snprintf((char *)amsg.payload, (unsigned int)len, in thread_spam()
122 amsg.len = (unsigned int)n; in thread_spam()
123 n = (int)lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
125 __minimal_destroy_message(&amsg); in thread_spam()
/third_party/libwebsockets/minimal-examples/ws-client/minimal-ws-client-tx/
Dminimal-ws-client.c80 struct msg amsg; in thread_spam() local
101 amsg.payload = malloc((unsigned int)(LWS_PRE + len)); in thread_spam()
102 if (!amsg.payload) { in thread_spam()
106 n = lws_snprintf((char *)amsg.payload + LWS_PRE, (unsigned int)len, in thread_spam()
108 amsg.len = (unsigned int)n; in thread_spam()
109 n = (int)lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
111 __minimal_destroy_message(&amsg); in thread_spam()
/third_party/libwebsockets/minimal-examples/dbus-server/minimal-dbus-ws-proxy/
Dprotocol_lws_minimal_dbus_ws_proxy.c319 struct msg amsg; in dmh_send() local
345 amsg.len = strlen(payload); in dmh_send()
347 amsg.payload = malloc(LWS_PRE + amsg.len); in dmh_send()
348 if (!amsg.payload) { in dmh_send()
355 amsg.binary = 0; in dmh_send()
356 amsg.first = 1; in dmh_send()
357 amsg.final = 1; in dmh_send()
359 memcpy((char *)amsg.payload + LWS_PRE, payload, amsg.len); in dmh_send()
360 if (!lws_ring_insert(wspctx->pss->ring_out, &amsg, 1)) { in dmh_send()
361 destroy_message(&amsg); in dmh_send()
/third_party/libwebsockets/plugins/
Dprotocol_lws_mirror.c206 struct a_message amsg; in callback_lws_mirror() local
438 amsg.payload = malloc(LWS_PRE + len); in callback_lws_mirror()
439 amsg.len = len; in callback_lws_mirror()
440 if (!amsg.payload) { in callback_lws_mirror()
445 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_lws_mirror()
446 if (!lws_ring_insert(pss->mi->ring, &amsg, 1)) { in callback_lws_mirror()
447 __mirror_destroy_message(&amsg); in callback_lws_mirror()