247 |
// Resetting a sampler channel: |
// Resetting a sampler channel: |
248 |
// RESET CHANNEL <sampler-channel> |
// RESET CHANNEL <sampler-channel> |
249 |
} |
} |
250 |
else if (lscp_parser_test2(&tok, "SUBSCRIBE", "NOTIFICATION")) { |
else if (lscp_parser_test(&tok, "SUBSCRIBE")) { |
251 |
// Register frontend for receiving UDP event messages: |
// Register frontend for receiving event notification messages: |
252 |
// SUBSCRIBE NOTIFICATION <udp-port> |
// SUBSCRIBE <event> |
253 |
ret = lscp_server_subscribe(pConnect, lscp_parser_nextint(&tok)); |
ret = lscp_server_subscribe(pConnect, lscp_event_from_text(lscp_parser_next(&tok))); |
254 |
} |
} |
255 |
else if (lscp_parser_test2(&tok, "UNSUBSCRIBE", "NOTIFICATION")) { |
else if (lscp_parser_test(&tok, "UNSUBSCRIBE")) { |
256 |
// Deregister frontend for not receiving UDP event messages anymore: |
// Deregister frontend for not receiving event notification messages anymore: |
257 |
// UNSUBSCRIBE NOTIFICATION <session-id> |
// UNSUBSCRIBE <event> |
258 |
ret = lscp_server_unsubscribe(pConnect, lscp_parser_next(&tok)); |
ret = lscp_server_unsubscribe(pConnect, lscp_event_from_text(lscp_parser_next(&tok))); |
259 |
} |
} |
260 |
else if (lscp_parser_test(&tok, "QUIT")) { |
else if (lscp_parser_test(&tok, "QUIT")) { |
261 |
// Close client connection: |
// Close client connection: |
325 |
else |
else |
326 |
if (strcmp(szLine, "list") == 0) { |
if (strcmp(szLine, "list") == 0) { |
327 |
for (p = pServer->connects.first; p; p = p->next) { |
for (p = pServer->connects.first; p; p = p->next) { |
328 |
printf("client: sock=%d addr=%s tcp.port=%d udp.port=%d ping=%d sessid=%s.\n", |
printf("client: sock=%d addr=%s port=%d events=0x%04x.\n", |
329 |
p->client.sock, |
p->client.sock, |
330 |
inet_ntoa(p->client.addr.sin_addr), |
inet_ntoa(p->client.addr.sin_addr), |
331 |
ntohs(p->client.addr.sin_port), |
ntohs(p->client.addr.sin_port), |
332 |
p->port, |
(int) p->events |
|
p->ping, |
|
|
p->sessid |
|
333 |
); |
); |
334 |
} |
} |
335 |
} |
} |
336 |
else |
else |
337 |
if (cchLine > 0 && strcmp(szLine, "help") != 0) |
if (cchLine > 0 && strcmp(szLine, "help") != 0) |
338 |
lscp_server_broadcast(pServer, szLine, strlen(szLine)); |
lscp_server_broadcast(pServer, LSCP_EVENT_MISCELLANEOUS, szLine, strlen(szLine)); |
339 |
else |
else |
340 |
server_usage(); |
server_usage(); |
341 |
|
|