update websocketExample
This commit is contained in:
parent
d523562463
commit
6664b14621
Binary file not shown.
@ -49,7 +49,7 @@ void unicast(struct mg_connection *nc, const struct mg_str msg) {
|
|||||||
recipient = strtok(tmp," ");
|
recipient = strtok(tmp," ");
|
||||||
actual_msg = strtok(NULL,"\0");
|
actual_msg = strtok(NULL,"\0");
|
||||||
printf("%s<%s\n",recipient,actual_msg);
|
printf("%s<%s\n",recipient,actual_msg);
|
||||||
snprintf(buf, sizeof(buf), "%s:%s ->%s",addr, nc->floID,actual_msg);
|
snprintf(buf, sizeof(buf), "%s:%s : %s",addr, nc->floID,actual_msg);
|
||||||
printf("%s<-%s\n",recipient, buf); /* Local echo. */
|
printf("%s<-%s\n",recipient, buf); /* Local echo. */
|
||||||
for (c = mg_next(nc->mgr, NULL); c != NULL; c = mg_next(nc->mgr, c)) {
|
for (c = mg_next(nc->mgr, NULL); c != NULL; c = mg_next(nc->mgr, c)) {
|
||||||
if (!strcmp(c->floID,recipient)) /* Send to receiver */
|
if (!strcmp(c->floID,recipient)) /* Send to receiver */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user