mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
websocket: add destinations to websocket_print()
This commit is contained in:
parent
86ec387b9a
commit
414fcc72f1
1 changed files with 9 additions and 7 deletions
|
@ -409,19 +409,21 @@ char * websocket_print(struct node *n)
|
|||
|
||||
char *buf = NULL;
|
||||
|
||||
buf = strcatf(&buf, "dests=");
|
||||
buf = strcatf(&buf, "destinations=[ ");
|
||||
|
||||
for (size_t i = 0; i < list_length(&w->destinations); i++) {
|
||||
struct lws_client_connect_info *in = list_at(&w->destinations, i);
|
||||
struct websocket_destination *d = list_at(&w->destinations, i);
|
||||
|
||||
buf = strcatf(&buf, "%s://%s:%d/%s",
|
||||
in->ssl_connection ? "https" : "http",
|
||||
in->address,
|
||||
in->port,
|
||||
in->path
|
||||
buf = strcatf(&buf, "%s://%s:%d/%s ",
|
||||
d->info.ssl_connection ? "wss" : "ws",
|
||||
d->info.address,
|
||||
d->info.port,
|
||||
d->info.path
|
||||
);
|
||||
}
|
||||
|
||||
buf = strcatf(&buf, "]");
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue