mike-jumper commented on code in PR #192:
URL: https://github.com/apache/guacamole-manual/pull/192#discussion_r1089801081
##########
src/protocol-reference.rst:
##########
@@ -1203,3 +1230,22 @@ human-readable way.
The client is already using too many resources. Existing resources must be
freed before further requests are allowed.
+Message Codes
+-------------
+
+The `msg` instruction must have at least one numeric argument that the client
+then uses to interpret the message and determine what action, if any, it
+should take based on the message. The following numeric codes are currently
+implemented for this instruction.
+
+1 (``USER_JOINED``)
+ Notifies the owner of a connection that another user has joined the
+ connection. This message is expected to include one additional
+ argument, which is a string with the name of the user who has
+ joined the connection.
+
+2 (``USER_LEFT``)
+ Notifies the owner of a connection that another user has left the
+ connection. This message is expected to include one additional
+ argument, a string with the name of the user who has left the
+ connection.
Review Comment:
I think these message types are missing an argument. For example, from
`client.c`:
```c
/* Send user joined notification to owner. */
const char* args[] = { (const char*)joiner->user_id, (const
char*)send_joiner, NULL };
return (void*) ((intptr_t) guac_protocol_send_msg(user->socket,
GUAC_MESSAGE_USER_JOINED, args));
```
There are two arguments sent with the join/leave messages: a unique ID for
the relevant user (assigned by guacd) and that user's arbitrary name (received
by guacd during the connection handshake).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]