Skip to content

Instantly share code, notes, and snippets.

@payden
Created December 1, 2013 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save payden/7741874 to your computer and use it in GitHub Desktop.
Save payden/7741874 to your computer and use it in GitHub Desktop.
int
onmessage(libwebsock_client_state *state, libwebsock_message *msg)
{
//my message is in msg->payload
//let's send received message to all clients
return libwebsock_send_all_text(state->ctx, msg->payload);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment