Home
last modified time | relevance | path

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

/external/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 …]
/external/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 …]
/external/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 = lws_is_first_fragment(wsi); in callback_minimal_server_echo()
172 amsg.final = lws_is_final_fragment(wsi); in callback_minimal_server_echo()
173 amsg.binary = 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 …]
/external/libwebsockets/minimal-examples/ws-client/minimal-ws-client-echo/
Dprotocol_lws_minimal_client_echo.c110 struct msg amsg; in callback_minimal_client_echo() local
218 amsg.first = lws_is_first_fragment(wsi); in callback_minimal_client_echo()
219 amsg.final = lws_is_final_fragment(wsi); in callback_minimal_client_echo()
220 amsg.binary = lws_frame_is_binary(wsi); in callback_minimal_client_echo()
227 amsg.len = len; in callback_minimal_client_echo()
229 amsg.payload = malloc(LWS_PRE + len); in callback_minimal_client_echo()
230 if (!amsg.payload) { in callback_minimal_client_echo()
235 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal_client_echo()
236 if (!lws_ring_insert(pss->ring, &amsg, 1)) { in callback_minimal_client_echo()
237 __minimal_destroy_message(&amsg); in callback_minimal_client_echo()
/external/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()
/external/libwebsockets/minimal-examples/client-server/minimal-ws-proxy/
Dprotocol_lws_minimal.c92 struct msg amsg; in callback_minimal() local
190 amsg.len = len; in callback_minimal()
192 amsg.payload = malloc(LWS_PRE + len); in callback_minimal()
193 if (!amsg.payload) { in callback_minimal()
198 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_minimal()
199 if (!lws_ring_insert(vhd->ring, &amsg, 1)) { in callback_minimal()
200 __minimal_destroy_message(&amsg); in callback_minimal()
/external/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()
/external/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads/
Dprotocol_lws_minimal.c85 struct msg amsg; in thread_spam() local
102 amsg.payload = malloc(LWS_PRE + len); in thread_spam()
103 if (!amsg.payload) { in thread_spam()
107 n = lws_snprintf((char *)amsg.payload + LWS_PRE, len, in thread_spam()
110 amsg.len = n; in thread_spam()
111 n = lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
113 __minimal_destroy_message(&amsg); in thread_spam()
/external/libwebsockets/minimal-examples/ws-server/minimal-ws-server-threads-smp/
Dprotocol_lws_minimal.c85 struct msg amsg; in thread_spam() local
102 amsg.payload = malloc(LWS_PRE + len); in thread_spam()
103 if (!amsg.payload) { in thread_spam()
107 n = lws_snprintf((char *)amsg.payload + LWS_PRE, len, in thread_spam()
110 amsg.len = n; in thread_spam()
111 n = lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
113 __minimal_destroy_message(&amsg); in thread_spam()
/external/libwebsockets/minimal-examples/http-server/minimal-http-server-sse-ring/
Dminimal-http-server-sse-ring.c88 struct msg amsg; in thread_spam() local
105 amsg.payload = malloc(len); in thread_spam()
106 if (!amsg.payload) { in thread_spam()
110 n = lws_snprintf((char *)amsg.payload, len, in thread_spam()
113 amsg.len = n; in thread_spam()
114 n = lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
116 __minimal_destroy_message(&amsg); in thread_spam()
/external/libwebsockets/minimal-examples/ws-client/minimal-ws-client-tx/
Dminimal-ws-client.c72 struct msg amsg; in thread_spam() local
89 amsg.payload = malloc(LWS_PRE + len); in thread_spam()
90 if (!amsg.payload) { in thread_spam()
94 n = lws_snprintf((char *)amsg.payload + LWS_PRE, len, in thread_spam()
97 amsg.len = n; in thread_spam()
98 n = lws_ring_insert(vhd->ring, &amsg, 1); in thread_spam()
100 __minimal_destroy_message(&amsg); in thread_spam()
/external/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()
/external/libwebsockets/plugins/
Dprotocol_lws_mirror.c202 struct a_message amsg; in callback_lws_mirror() local
421 amsg.payload = malloc(LWS_PRE + len); in callback_lws_mirror()
422 amsg.len = len; in callback_lws_mirror()
423 if (!amsg.payload) { in callback_lws_mirror()
428 memcpy((char *)amsg.payload + LWS_PRE, in, len); in callback_lws_mirror()
429 if (!lws_ring_insert(pss->mi->ring, &amsg, 1)) { in callback_lws_mirror()
430 __mirror_destroy_message(&amsg); in callback_lws_mirror()
/external/adhd/cras/src/server/
Daudio_thread.c578 struct audio_thread_add_rm_stream_msg *amsg; in handle_audio_thread_message() local
579 amsg = (struct audio_thread_add_rm_stream_msg *)msg; in handle_audio_thread_message()
581 amsg->stream->stream_id, 0, 0); in handle_audio_thread_message()
582 ret = thread_add_stream(thread, amsg->stream, amsg->devs, in handle_audio_thread_message()
583 amsg->num_devs); in handle_audio_thread_message()