Created
December 1, 2013 22:49
-
-
Save payden/7741879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int | |
onmessage(libwebsock_client_state *state, libwebsock_message *msg) | |
{ | |
unsigned int count = 0; | |
unsigned int len = strlen(msg->payload); | |
libwebsock_client_state *current; | |
for (current = state->ctx->clients_HEAD; current != NULL; current = current->next) { | |
libwebsock_send_fragment(current, msg->payload, len, WS_FRAGMENT_FIN | WS_OPCODE_TEXT); | |
count++; | |
} | |
return count; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment