update websocketExample

This commit is contained in:
sairajzero 2019-04-05 17:22:23 +05:30
parent d523562463
commit 6664b14621
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -49,7 +49,7 @@ void unicast(struct mg_connection *nc, const struct mg_str msg) {
recipient = strtok(tmp," ");
actual_msg = strtok(NULL,"\0");
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. */
for (c = mg_next(nc->mgr, NULL); c != NULL; c = mg_next(nc->mgr, c)) {
if (!strcmp(c->floID,recipient)) /* Send to receiver */