-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jim Ramsay <[email protected]>
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
WAYVNCCTL=${WAYVNCCTL:-wayvncctl} | ||
|
||
connection_count_now() { | ||
echo "Total clients: $count" | ||
} | ||
|
||
while IFS= read -r EVT; do | ||
case "$(jq -r '.method' <<<"$EVT")" in | ||
client-*onnected) | ||
count=$(jq -r '.params.connection_count' <<<"$EVT") | ||
connection_count_now "$count" | ||
;; | ||
esac | ||
done < <("$WAYVNCCTL" --json event-receive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ struct ctl_client { | |
|
||
char read_buffer[512]; | ||
size_t read_len; | ||
|
||
bool wait_for_events; | ||
|
||
int fd; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters