1.10.3
The most recent version of the UPC protocol is available at: http://unionplatform.com/specs/upc/.
Older versions of the UPC protocol are available under Revision History.
The Union Procedure Call (UPC) protocol is the Union platform's central communications protocol. It describes the message format used in all client/server communication and specifies a list of native messages supported by the Union server.
Structurally, UPC is a simple XML format that includes a message id and a list of arguments. A UPC message can be sent from the client to the server or the server to the client. Either way, every UPC message has the following general form:
<u> <m>messageID</m> <l> <a>value1</a> <a>value2</a> <a>...</a> <a>valuen</a> </l> </u>
In the preceding message, the messageID
is the message's identifier, which is typically a short code such as "u1" or "u2". The arguments for the message are specified by value1, value2, ...valuen
.
Note that Union application developers need not necessarily be concerned with the format of raw UPC messages because Union Server and some Union client frameworks wrap UPC messages in a higher-level API. For example, in the Reactor framework for Flash-client development, a client joins a room by invoking the Room class's join() method, not by manually transmitting the XML for a "u4" UPC message. Similarly, the result of the join-room request is sent to the client in the form of a "u6" UPC message, but the client need not read that message directly; instead, the client simply handles the RoomEvent.JOIN event. However, some lightweight frameworks, such as OrbiterMicro, require the application developer to communicate by sending and responding to UPC messages directly.
Fully qualified room IDs in UPC messages must not contain the following reserved characters.
* (asterisk) | (pipe)
The asterisk character is reserved for use as a wildcard character when indicating "all rooms qualifed by a specified qualifier." For example, the expression "a.b.*" means "all rooms with the room qualifier 'a.b'". By contrast, the expression "a.b" means "room 'b', qualified by 'a'". The pipe character is reserved for use as a record separator.
Furthermore, in room qualifiers and fully qualified room ids, the dot character (.) is reserved for use as a room id separator.
In the following tables, the record separator character, "|", is represented by the token "[RS]".
Before transporting UPC messages that contain other UPC messages (e.g., u155), Union Server and Union clients escape any nested CDATA-section start-and-end tokens as follows:
For example, the following CDATA section:
<[CDATA[Hello]]>
becomes:
<([CDATA[Hello]])>
The UPC protocol version takes format: majorNumber.minorNumber.revisionNumber. For example, in the version number 1.2.0, the majorNumber is 1, the minorNumber is 2, and the revisionNumber is 0. Every client must declare its UPC protocol version in its initial u65 message. If a client's declared version number does not match the server's then the client is either loosely or strictly incompatible with the server. Strictly incompatible clients are disconnected automatically. For complete details, see the description for the u65 message.
Tables 1 and 2 list all messages in the UPC protocol.
Official Message Name | Internal Message ID | Arguments | Corresponding Client API | Description |
SEND_MESSAGE_TO_ROOMS | u1 |
|
RoomManager.sendMessage(), Room.sendMessage() |
Asks the server to send a u7 with the specified messageName to all clients in the room list that pass the provided filter tests. The includeSelf argument is a Boolean indicating whether the message should be echoed to the sending client (assuming the sender is in the room list and passes the filter tests). If any of the rooms in the list is a room qualifier, the message is sent to all rooms qualified by that qualifier. Qualifiers in the room list must be formed using the * character; for example, "examples.*" means "the examples qualifier" whereas "examples" means the room named "examples". To send a message to all rooms qualified by the unnamed qualifier, use "*" for the room qualifier. The server sends separate u7 messages for every room in the room list. For example, if the room list is "chat1 [RS] chat2" and a client is in both "chat1" and "chat2", the client will receive u7 twice (once for each room). |
SEND_MESSAGE_TO_CLIENTS | u2 |
|
Client.sendMessage() | Asks the server to send a u7 with the specified messageName to all clients in client list that pass the provided filter tests. |
SEND_MESSAGE_TO_SERVER | u57 |
|
Server.sendMessage() | Asks the server to send a u7 with the specified messageName to all clients on the server that pass the provided filter tests. The includeSelf argument is a Boolean indicating whether the message should be echoed to the sending client. |
SET_CLIENT_ATTR | u3 |
|
Client.setAttribute(), UserAccount.setAttribute() |
Asks the server to set a client attribute for client specified by clientID or the user account specified by userID. If the persistent bit is set, the server sets the attribute on the specified userID's account; if not, the server sets the attribute on the specified client. The result of the request is returned to the sender via a u73. If the attribute is shared, any clients needing to be notified of the attribute assignment will receive a u8. When the sender sets one of its own attributes via u3, the new attribute value is echoed back to the sender in a u8 in the following situations only:
The specified attrScope must be a room, and cannot be a qualifier; however, future versions of the UPC protocol might support qualifier-scoped attributes. The meanings of the "attrOptions" bits are as follows:
|
JOIN_ROOM | u4 |
|
Room.join(), RoomManager.joinRoom() | Asks the server to attempt to add the sender to the specified room. The result of attempting to join the room is returned to the sender via a u72. If the attempt is successful, the sender is also sent a u6, followed by updates for the room according to the sender's specified update levels (see u64). When a room is removed from the server, clients in that room receive a u44, but do not automatically receive notification that the room was removed. Clients wishing to be notified when a room is removed must register for notifications via WATCH_FOR_ROOMS. |
SET_ROOM_ATTR | u5 |
|
Room.setAttribute() | Asks the server to set a room attribute for the specified room. The result of the request is returned to the sender via a u74. If the attribute is shared, any clients needing to be notified of the attribute assignment will receive a u9. The meanings of the "attrOptions" bits are as follows:
|
LEAVE_ROOM | u10 |
|
Room.leave() | Asks the server to remove the sender from the specified room. The result of attempting to leave the room is returned to the sender via a u76. If the attempt is successful, the sender is also sent a u44. |
CREATE_ACCOUNT | u11 |
|
AccountManager.createAccount() | Asks the server to create a new user account, used to store information permanently in a persistent data source such as a database. Results of the create-account attempt are returned via a u47. |
REMOVE_ACCOUNT | u12 |
|
AccountManager.removeAccount() | Asks the server to remove the user account for the specified userID. Results of the remove-account attempt are returned via a u48. |
CHANGE_ACCOUNT_PASSWORD | u13 |
|
AccountManager.changePassword(), UserAccount.changePassword() | Asks the server to change the specified userID's account password. Results of the change password attempt are returned via a u46. If the attempt succeeds, and a client is currently logged in under the specified userID, the server also sends a u90 to that client. |
LOGIN | u14 |
|
AccountManager.login() | Asks the server to login the sending client. Results of the login attempt are returned via a u49. If the attempt succeeds, the server also sends a u88 followed by a series of u8s containing the client's persistent attributes. If the userID specified for a u14 is already logged in under another client ID, the previous client is logged off and disconnected before the new login proceeds. Note that the sending client can ask to log in itself only; a u14 cannot be used to log in a foreign client. |
GET_CLIENTCOUNT_SNAPSHOT | u18 |
|
ClientCountSnapshot |
Asks the server to return the number of clients on the server. The result of a u18 request is returned to the sender via a u75. If the request is successful, the number of clients on the server is returned to the sender via a u34. |
SYNC_TIME | u19 | None | Server.syncTime() | Asks the server to return the current time. The result is returned via a u50. |
GET_ROOMLIST_SNAPSHOT | u21 |
|
RoomListSnapshot | Asks the server to return a list of the rooms whose ids are qualified by roomIdQualifier. The result is returned via a u38. For a server-wide room list, supply the empty string ("") for roomIdQualifier and true for recursive. For a list of rooms with the unnamed qualifier, supply the empty string ("") for roomIdQualifier and false for recursive. For a list of rooms with the qualifier "chat.sports", supply "chat.sports" for roomIdQualifier and false for recursive. Note: the recursive argument is currently available for the unnamed qualifier ("") only. Recursion for other qualifiers is planned for future versions of the UPC protocol. |
CREATE_ROOM | u24 |
|
RoomManager.createRoom() |
Asks the server to create the specified room. If roomID is empty, then the server creates the room ID automatically. To determine the room's ID, the client must watch for a room addition message (u39). Recognized setting names for the second argument are as follows:
The third argument lists the room's initial attributes. The fourth argument lists room's room modules, which can be defined by a script or a class. Scripts and classes can be listed in any order. A path to a script indicates the location of a script relative to the server's central scripts directory. |
REMOVE_ROOM | u25 |
|
RoomManager.removeRoom() | Asks the server to remove the specified room. If the request is successful, the server sends a u40 to all clients in or observing the room. The client that sent the u25 message also receives a u33. Clients do not receive separate u37 (CLIENT_REMOVED) notifications for clients that are forced out of the room when it is removed. |
WATCH_FOR_ROOMS | u26 |
|
RoomManager.watchForRooms() | Asks the server to inform the client when new rooms qualified by roomIdQualifier are added to or removed from the server. The server sends the result of the request via a u42. If the request was successful, the server also sends a u38. Subsequent room additions trigger u39; subsequent room removals trigger u40. It is legal to watch a qualifier that does not yet exist. To watch for all rooms on the server, supply the empty string ("") for roomIdQualifier and true for recursive. To watch for rooms with the unnamed qualifier, supply the empty string ("") for roomIdQualifier and false for recursive. To watch for rooms with the qualifier "examples", supply "examples" for roomIdQualifier and false for recursive. Note: the recursive argument is currently available for the unnamed qualifier ("") only. Recursion for other qualifiers is planned for future versions of the UPC protocol. |
STOP_WATCHING_FOR_ROOMS | u27 |
|
RoomManager.stopWatchingForRooms() | Asks the server to stop sending room-addition-and-removal notifications for the specified roomIdQualifier. The server sends the result of the request via a u43. To stop watching for all rooms on the server, supply the empty string ("") for roomIdQualifier and true for recursive. To stop watching for rooms with the unnamed qualifier, supply the empty string ("") for roomIdQualifier and false for recursive. To stop watching for rooms with the qualifier "examples", supply "examples" for roomIdQualifier and false for recursive. Note: the recursive argument is currently available for the unnamed qualifier ("") only. Recursion for other qualifiers is planned for future versions of the UPC protocol. |
GET_ROOM_SNAPSHOT | u55 |
|
RoomSnapshot | Asks the server to send a room snapshot for the specified room. In response, the server sends a u60 and, if the request succeeds, a u54. The updateLevels parameter specifies the amount of information that should be included in the snapshot, following the rules described under u64. If updateLevels is not supplied, the sender's update levels for the room are used. If the sender does not have update levels specified for the room, the room's maximum levels are used. |
OBSERVE_ROOM | u58 |
|
Room.observe(), RoomManager.observeRoom() |
Used for spectating a room the client is not in. A u58 asks the server to register the sender as an observer of the specified room. The result of attempting to observe the room is returned to the sender via a u77. If the attempt is successful, the sender is also sent a u59, and will subsequently receive updates for the room in accordance with the client's specified occupant, room, and message update levels. If a client changes its update levels, subsequent updates are sent according to the new levels. For details on which updates are sent and how levels affect updates, see u64. If a client is in a room, it can still register to observe that room. Likewise, a client can observe a room, and then join and leave it arbitrarily without affecting observation status. When a client is both an observer and an occupant of a room, it receives updates about the room even after leaving it. Clients that observe a room and then join it will not receive a u54 at join time. When a room is removed from the server, clients in that room receive a u62, but do not automatically receive notification that the room was removed. Clients wishing to be notified when a room is removed must register for notifications via WATCH_FOR_ROOMS. |
STOP_OBSERVING_ROOM | u61 |
|
Room.stopObserving(), RoomManager.stopObservingRoom() | Asks the server to unregister the sender as an observer of the specified room. The result of the request is returned to the sender via a u78. If the attempt is successful, the sender is also sent a u62. |
SET_ROOM_UPDATE_LEVELS | u64 |
|
Room.setUpdateLevels(), Room.join(), Room.observe(), RoomManager.joinRoom(), RoomManager.observeRoom() | Asks the server to change the client's update levels for the specified room. The server applies only those changes permitted for the client's security level. When a client's room update levels change, the server sends that client a u128. The updateLevel parameter is an integer whose ordered bits represent the following update levels:
The update levels specified by the preceding bits determine how much information is pushed to the client when it is either in or observing a room. In the preceding list, *, **, ***, and **** have the following meanings:
|
CLIENT_HELLO | u65 |
|
ReactorEvent.PROTOCOL_INCOMPATIBLE. | CLIENT_HELLO is the first step in the client-server connection process. It tells the server the client's type, the user agent (software name and version) being used to make the connection, and the UPC protocol version used by the client to communicate. The server responds with a u66, and then:
Example values for clientType are:
The userAgent is a human-readable string set arbitrarily by the client, and is used for logging purposes only. For example, "Flash Player WIN 9,0,124,0 StandAlone (debug, localTrusted)". The upcVersion specifies the version of the UPC specification used by the client, in the format: majorNumber.minorNumber.revisionNumber. For example, 1.2.0. If the client's majorNumber, minorNumber, and revisionNumber all match the server's majorNumber, minorNumber, and revisionNumber, the server is considered compatible with the client. Otherwise:
|
REMOVE_ROOM_ATTR | u67 |
|
Room.deleteAttribute() | Asks the server to remove a room attribute from the specified room. The result is returned via a u80. If the request is successful, all clients requiring notification of the change are sent a u79. |
REMOVE_CLIENT_ATTR | u69 |
|
Client.deleteAttribute(), UserAccount.deleteAttribute() | Asks the server to remove a client attribute from the client specified by clientID or the user account specified by userID. The clientID and userID arguments are mutually exclusive; only one or the other is allowed. The result of the request is returned via a u82. If the request succeeds, all clients needing to be notified of the deletion are sent a u81. If clientID is not specified, the attribute is deleted from the sending client. |
SEND_ROOMMODULE_MESSAGE | u70 |
|
Room.sendModuleMessage() | Sends the specified message to all of the modules of the specified room. The argument names (argName1, argName2,...argNamen) must not contain the pipe (|) character. Argument values can contain the pipe (|) character. |
SEND_SERVERMODULE_MESSAGE | u71 |
|
Server.sendModuleMessage() | Sends the specified message to the specified server module. The moduleID must be the ID of a deployed server module on the server. The argument names (argName1, argName2,...argNamen) must not contain the pipe (|) character. Argument values can contain the pipe (|) character. |
TERMINATE_SESSION | u83 |
|
Asks the server to terminate the session specified by sessionID. | |
LOGOFF | u86 |
|
AccountManager.logoff(), UserAccount.logoff() | Asks the server to logoff the user account specified by userID. Results of the logoff attempt are returned via a u87. If the attempt succeeds, the server logs off and then disconnects the client. |
GET_CLIENTLIST_SNAPSHOT | u91 |
|
ClientListSnapshot | Asks the server to send a list of clientIDs for all clients currently connected to the server. The list will also include userIDs for all clients with user accounts that are currently logged in. The result is sent via a u101. See also u97. |
WATCH_FOR_CLIENTS | u92 | ClientManager.watchForClients() | Asks the server to inform the client when clients connect or disconnect, or login or logoff. The server sends the result of the request via a u107. If the request was successful, the server also sends a u101. Subsequent client connections trigger a u102; subsequent client disconnections trigger a u103. Subsequent client logins trigger a u88; subsequent client logoffs trigger a u89. | |
STOP_WATCHING_FOR_CLIENTS | u93 | ClientManager.stopWatchingForClients() | Asks the server to stop sending client connection-and-disconnnection notifications. The server sends the result of the request via a u108. | |
GET_CLIENT_SNAPSHOT | u94 |
|
ClientSnapshot | Asks the server to send a snapshot for the specified client. In response, the server sends a u115 and, if the request succeeds, a u104. |
OBSERVE_CLIENT | u95 |
|
Client.observe(), ClientManager.observeClient() | Asks the server to register the sender as an observer of the specified client. In response, the server sends a u105 and, if the request succeeds, a u119 followed by a u104. Subsequently if the specified client's state changes, the observing client is notified in the following ways:
|
STOP_OBSERVING_CLIENT | u96 |
|
Client.stopObserving(), ClientManager.stopObservingClient() | Asks the server to unregister the sender as an observer of the specified client. In response, the server sends a u106. If the request succeeds, the server also sends a u120, and stops sending updates about the specified client. |
GET_ACCOUNTLIST_SNAPSHOT | u97 |
|
AccountListSnapshot | Asks the server to send a list of userIDs for all registered user accounts on the server. The result is sent via a u127. See also u91. |
WATCH_FOR_ACCOUNTS | u98 | AccountManager.watchForAccounts() | Asks the server to inform the client when new user accounts are created. The server sends the result of the request via a u109. If the request was successful, the server also sends a u127. Subsequent user-account creations trigger a u111; subsequent user-account removals trigger a u112. | |
STOP_WATCHING_FOR_ACCOUNTS | u99 | AccountManager.stopWatchingForAccounts() | Asks the server to stop sending user-account creation-and-removal notifications. The server sends the result of the request via a u110. | |
GET_ACCOUNT_SNAPSHOT | u100 |
|
AccountSnapshot | Asks the server to send a snapshot for the specified user account, including all persistent data stored in the user's account. In response, the server sends a u116 and, if the request succeeds, a u104. |
OBSERVE_ACCOUNT | u121 |
|
UserAccount.observe(), AccountManager.observeAccount() | Asks the server to register the sender as an observer of the specified user account. In response, the server sends a u123 and, if the request succeeds, a u124. Subsequently if the specified user account's state changes, the observing client is notified in the following ways:
|
STOP_OBSERVING_ACCOUNT | u122 |
|
UserAccount.stopObserving(), AccountManager.stopObservingAccount() | Asks the server to unregister the sender as an observer of the specified user account. In response, the server sends a u125. If the request succeeds, the server also sends a u126, and stops sending updates about the specified user account. |
ADD_ROLE | u133 |
|
UserAccount.addRole(), AccountManager.addRole() | Asks the server to assign the specified role to the user account with the specified userID. In response, the server sends a u134. An account's role(s) determine which actions a user is allowed to perform on Union Server. For a list of security actions and corresponding rules, see Union Server's documentation. Legal values for role are:
|
REMOVE_ROLE | u135 |
|
UserAccount.removeRole(), AccountManager.removeRole() | Asks the server to remove the specified role from the user account with the specified userID. In response, the server sends a u136. Legal values for role are listed under u133. |
BAN | u137 |
|
ClientManager.ban(), Client.ban() | Asks the server to refuse all connection attempts made by a particular client address. A "client address" is the logical origin of a client connection, typically an IP address. If the address parameter is provided, the specified address is banned and clientID is ignored. If no address parameter is provided, then clientID must be provided, and the address of the client with the specified clientID is banned. The ban lasts for the number of seconds specified by duration. The reason parameter is an arbitrary optional string indicating the reason for the ban. The reason string is stored by the server in the banned list. The result of a ban attempt is returned via a u138. A list of current banned addresses can be retrieved via a u141 or u143. |
UNBAN | u139 |
|
ClientManager.unban(), Client.unban() | Asks the server to remove a banned a client address from the banned list. The result of the unban attempt is returned via a u140. |
GET_BANNED_LIST_SNAPSHOT | u141 |
|
ClientListSnapshot | Asks the server to send a list of addresses currently banned from connecting to the server. The result is sent via a u142. See also u143. |
WATCH_FOR_BANNED_ADDRESSES | u143 | ClientManager.watchForBannedAddresses() | Asks the server to inform the sending client when addresses are banned or unbanned. The server sends the result of the request via a u144. If the request was successful, the server also sends a u142. Subsequently, when an address is banned, the server sends a u147; when an address is unbanned, the server sends a u148. | |
STOP_WATCHING_FOR_BANNED_ADDRESSES | u145 | ClientManager.stopWatchingForBannedAddresses() | Asks the server to stop sending banned-address notifications. The server sends the result of the request via a u146. | |
KICK_CLIENT | u149 |
|
ClientManager.kickClient(), Client.kick() | Asks the server to forcibly disconnect the client with the specified clientID. The server sends the result of the request via a u150. |
GET_SERVERMODULELIST_SNAPSHOT | u151 |
|
ServerModuleListSnapshot | Asks the server to send a list of currently active server modules (not to be confused with room modules). The result is sent via a u152. By default, u151 requires administrator privileges. |
CLEAR_MODULE_CACHE | u153 | Server.clearModuleCache() | Asks the server to remove all current module class definitions from memory. Subsequently instantiated modules will use the newly loaded module class definitions, allowing module developers to update Union Server's modules at runtime without restarting the server. By default, u153 requires administrator privileges. | |
GET_UPC_STATS_SNAPSHOT | u154 | UPCStatsSnapshot | Asks the server to send a list of UPC-message-processing statistics. In response, the server sends a u155 and, if the request succeeds, a u156. By default, u154 requires administrator privileges. | |
RESET_UPC_STATS | u157 | Server.resetUPCStats() | Asks the server to reset server-side UPC-processing statistics. The following statistics are affected by a reset:
|
|
WATCH_FOR_PROCESSED_UPCS | u159 | Server.watchForProcessedUPCs() | Asks the server to notify the sending client upon processing any UPC message. The server sends the result of the request via a u160. Notifications are transmitted via u161. By default, u159 requires administrator privileges. | |
STOP_WATCHING_FOR_PROCESSED_UPCS | u162 | Server.stopWatchingForProcessedUPCs() | Asks the server to stop sending UPC-processing notifications to the sending client. The server sends the result of the request via a u163. By default, u162 requires administrator privileges. | |
GET_NODELIST_SNAPSHOT | u165 |
|
NodeListSnapshot | Asks the server to return a list of the cluster nodes currently connected to the server. The result is returned via a u166. |
GET_GATEWAYS_SNAPSHOT | u167 |
|
GatewaysSnapshot | Asks the server to return a per-gateway summary of connection and bandwidth statistics. The result is returned via a u168. By default, access to gateway statistics requires administrator privileges. |
Official Message Name | Internal Message ID | Arguments | Corresponding Client API | Description | Status Codes |
JOINED_ROOM | u6 |
|
RoomEvent.JOIN | Informs the client that it joined a room. | |
RECEIVE_MESSAGE | u7 |
|
No direct corresponding method. But see MessageManager.addMessageListener(), Room.addMessageListener(). | Causes the client to execute listeners registered for "messageName". u7 is sent in response to u1, u2, and u57. The broadcastType argument's three possible values--0, 1, or 2--indicate which clients received the message, as follows:
|
|
CLIENT_ATTR_UPDATE | u8 |
|
AttributeEvent.UPDATE | Reports a change to a client attribute. | |
ROOM_ATTR_UPDATE | u9 |
|
AttributeEvent.UPDATE | Reports a change to a room attribute. The clientID specifies the id of the client that changed the attribute. If the attribute was not changed by a client (as is the case when the server sets the attribute), clientID is empty. | |
CLIENT_METADATA | u29 |
|
None. This UPC is handled internally. | Provides each connecting client with its initial setup information. | |
CREATE_ROOM_RESULT | u32 |
|
RoomManagerEvent.CREATE_ROOM_RESULT | Reports the result of a room-creation attempt to the client. |
|
REMOVE_ROOM_RESULT | u33 |
|
RoomManagerEvent.REMOVE_ROOM_RESULT | Reports the result of a room-removal attempt to the client. |
|
CLIENTCOUNT_SNAPSHOT | u34 |
|
ClientCountSnapshot | Reports the number of clients on the server. | |
CLIENT_ADDED_TO_ROOM | u36 |
|
RoomEvent.ADD_OCCUPANT | Reports that the specified client has joined the specified room. | |
CLIENT_REMOVED_FROM_ROOM | u37 |
|
RoomEvent.REMOVE_OCCUPANT | Reports that the specified client has left the specified room. | |
ROOMLIST_SNAPSHOT | u38 |
|
RoomManagerEvent.ROOM_ADDED, RoomManagerEvent.ROOM_REMOVED | Provides a list of rooms on the server. A u38 is sent in response to u21 and u26. The requestedRoomIDQualifier and recursive arguments are the original values supplied to the call that generated the room list. | |
ROOM_ADDED | u39 |
|
RoomManagerEvent.ROOM_ADDED | Reports that the specified room was added. Sent to clients watching the specified room's qualifier. See u26. | |
ROOM_REMOVED | u40 |
|
RoomManagerEvent.ROOM_REMOVED | Reports that the specified room was removed. Sent to clients watching the specified room's qualifier. See u26. Also sent to clients in or observing a room when the room is removed (regardless of their update levels). Note that clients do not receive separate u37 (CLIENT_REMOVED) notifications for clients that are forced out of a room when it is removed. | |
WATCH_FOR_ROOMS_RESULT | u42 |
|
RoomManagerEvent.WATCH_FOR_ROOMS_RESULT | Reports the result of a u26 request. The roomIdQualifier and recursive arguments specify the values supplied to the instigating u26 request. |
|
STOP_WATCHING_FOR_ROOMS_RESULT | u43 |
|
RoomManagerEvent.STOP_WATCHING_FOR_ROOMS_RESULT | Reports the result of a u27 request. The roomIdQualifier and recursive arguments specify the values supplied to the instigating u26 request. |
|
LEFT_ROOM | u44 |
|
RoomEvent.LEAVE | Informs the client that it left the specified roomID, normally as a result of an earlier u10 request. | |
CHANGE_ACCOUNT_PASSWORD_RESULT | u46 |
|
AccountEvent.CHANGE_PASSWORD_RESULT | Reports the result of an attempt to change the password for the account specified by userID. See u13. |
|
CREATE_ACCOUNT_RESULT | u47 |
|
AccountManagerEvent.CREATE_ACCOUNT_RESULT | Reports the result of an attempt to create the client account specified by userID. See u11. |
|
REMOVE_ACCOUNT_RESULT | u48 |
|
AccountManagerEvent.REMOVE_ACCOUNT_RESULT | Reports the result of an attempt to remove (delete) the client account specified by userID. See u12. |
|
LOGIN_RESULT | u49 |
|
AccountEvent.LOGIN_RESULT | Reports the result of a login attempt made by the receiving client. See u14. |
|
SERVER_TIME_UPDATE | u50 |
|
ServerEvent.TIME_SYNC | Reports the current time on the server, in UTC, using milliseconds-from-1970 format. See u19. | |
ROOM_SNAPSHOT | u54 |
|
RoomEvent.SYNCHRONIZE | Provides a manifest of a room's contents (attributes and clients). The content of the manifest is limited by the receiving client's update levels (set via u64) and security privileges. The server sends u54 messages in response to either joining a room (u4), observing a room (u58), or requesting a room snapshot (u55). The "occupantObserverIndicator" parameter indicates whether the client is an occupant of the room (in which case, occupantObserverIndicator is 0) or an observer of the room (in which case, occupantObserverIndicator is 1). | |
OBSERVED_ROOM | u59 |
|
RoomEvent.OBSERVE | Informs the client that it started observing the specified room. | |
GET_ROOM_SNAPSHOT_RESULT | u60 |
|
SnapshotEvent.STATUS | Reports the result of a u55 request by the client. |
|
STOPPED_OBSERVING_ROOM | u62 |
|
RoomEvent.STOP_OBSERVING | Informs the client that it has stopped observing the specified room, normally in response to an earlier "stop observing rooms" request (u61). | |
CLIENT_READY | u63 | UConnectionEvent.READY | Informs the client that all setup tasks have completed and the client is ready for use. | ||
SERVER_HELLO | u66 |
|
ReactorEvent.PROTOCOL_INCOMPATIBLE | SERVER_HELLO is the second step in the client-server connection process. It tells the client the server's version and protocol version, and provides the client with a server-side session ID used to identify the connection. If the server determines the client to be unacceptably protocol-incompatible, the server will automatically disconnect the client. For compatibility details, see u65. The affinityAddress indicates the server's public address. When affinityAddress is provided, clients must send all communications to that address for the specified affinityDuration, which is given in minutes. Union Platform's affinity system ensures that a given client will connect to a specific Union Server node in a cluster for a specified duration, as is required in load-balanced configurations. For details, see Clustering Union Server. | |
JOIN_ROOM_RESULT | u72 |
|
RoomEvent.JOIN_RESULT | Reports the result of a join-room request (u4). If status is SUCCESS, the client is also sent a separate u6 message. |
|
SET_CLIENT_ATTR_RESULT | u73 |
|
AttributeEvent.SET_RESULT | Reports the result of a request to change a client attribute. |
|
SET_ROOM_ATTR_RESULT | u74 |
|
AttributeEvent.SET_RESULT | Reports the result of a request to change a room attribute. |
|
GET_CLIENTCOUNT_SNAPSHOT_RESULT | u75 |
|
SnapshotEvent.STATUS | Reports the result of a request for the number of clients on the server. |
|
LEAVE_ROOM_RESULT | u76 |
|
RoomEvent.LEAVE_RESULT | Reports the result of an attempt to leave the specified roomID. See u10. |
|
OBSERVE_ROOM_RESULT | u77 |
|
RoomEvent.OBSERVE_RESULT | Reports the result of a room observation attempt (u58) by the client. If status is SUCCESS, the client is also sent a separate u59 message. |
|
STOP_OBSERVING_ROOM_RESULT | u78 |
|
RoomEvent.STOP_OBSERVING | Reports the result of an attempt to stop observing the specified roomID. See u61. |
|
ROOM_ATTR_REMOVED | u79 |
|
AttributeEvent.DELETE | Reports the removal of a room attribute. The clientID specifies the id of the client that removed the attribute. If the attribute was not removed by a client (as is the case when the server removes the attribute), clientID is empty. | |
REMOVE_ROOM_ATTR_RESULT | u80 |
|
AttributeEvent.DELETE_RESULT | Reports the result of a request to remove a room attribute. |
|
CLIENT_ATTR_REMOVED | u81 |
|
AttributeEvent.DELETE | Reports the removal of a client attribute. | |
REMOVE_CLIENT_ATTR_RESULT | u82 |
|
AttributeEvent.DELETE_RESULT | Reports the result of a request to remove a client attribute. |
|
SESSION_TERMINATED | u84 | Informs the client that its session has been terminated. u84 is sent to the client when the server forcibly ends the client's session. | |||
SESSION_NOT_FOUND | u85 | Informs the client that it sent an unknown session id. u85 is sent to the client in the following situations:
|
|||
LOGOFF_RESULT | u87 |
|
AccountEvent.LOGOFF_RESULT | Reports the result of an attempt to log off the client with the specified userID. See u86. |
|
LOGGED_IN | u88 |
|
AccountEvent.LOGGED_IN | Informs the recipient that the client with the specified clientID has logged into the account with the specified userID. See u14. Depending on the recipient's awareness of the logged in account, the u88 message includes the account's persistent attributes according to the following rules:
|
|
LOGGED_OFF | u89 |
|
AccountEvent.LOGGED_OFF | Informs the recipient that the client with the specified clientID has logged off of the account with the specified userID. That client will also subsequently be disconnected. See u86. | |
ACCOUNT_PASSWORD_CHANGED | u90 | AccountEvent.ACCOUNT_PASSWORD_CHANGED | Informs the receiving client that its password has been changed. See u13. | ||
CLIENTLIST_SNAPSHOT | u101 |
|
ClientManagerEvent.CLIENT_CONNECTED, ClientManagerEvent.CLIENT_DISCONNECTED, ClientManagerEvent.SYNCHRONIZE | Provides a list of all clients currently connected to the server. For all clients that are logged in, userIDs are also included. See u91. | |
CLIENT_ADDED_TO_SERVER | u102 |
|
ClientManagerEvent.CLIENT_CONNECTED | Informs the recipient that the client with the specified clientID has connected to the server. See u92. | |
CLIENT_REMOVED_FROM_SERVER | u103 |
|
ClientManagerEvent.CLIENT_DISCONNECTED | Informs the recipient that the client with the specified clientID has disconnected from the server. See u92. | |
CLIENT_SNAPSHOT | u104 |
|
ClientEvent.SYNCHRONIZE, AccountEvent.SYNCHRONIZE | Provides a manifest describing the state of the specified client (and user account, in the case of logged-in clients). See u94, u95, and u100. The content of the manifest is limited by the receiving client's security privileges. | |
OBSERVE_CLIENT_RESULT | u105 |
|
ClientEvent.OBSERVE_RESULT | Reports the result of a client observation attempt (u95) made by the recipient. If status is SUCCESS, the client is also sent a separate u119 message. |
|
STOP_OBSERVING_CLIENT_RESULT | u106 |
|
ClientEvent.STOP_OBSERVING_RESULT | Reports the result of an attempt by the recipient to stop observing the specified client (see u96). If status is SUCCESS, the client is also sent a separate u120 message. |
|
WATCH_FOR_CLIENTS_RESULT | u107 |
|
ClientManagerEvent.WATCH_FOR_CLIENTS_RESULT | Reports the result of a WATCH_FOR_CLIENTS (u92) request made by the recipient. |
|
STOP_WATCHING_FOR_CLIENTS_RESULT | u108 |
|
ClientManagerEvent.STOP_WATCHING_FOR_CLIENTS_RESULT | Reports the result of a STOP_WATCHING_FOR_CLIENTS (u93) request made by the recipient. |
|
WATCH_FOR_ACCOUNTS_RESULT | u109 |
|
AccountManagerEvent.WATCH_FOR_ACCOUNTS_RESULT | Reports the result of a WATCH_FOR_ACCOUNTS (u98) request made by the recipient. |
|
STOP_WATCHING_FOR_ACCOUNTS_RESULT | u110 |
|
AccountManagerEvent.STOP_WATCHING_FOR_ACCOUNTS_RESULT | Reports the result of a STOP_WATCHING_FOR_ACCOUNTS (u99) request made by the recipient. |
|
ACCOUNT_ADDED | u111 |
|
AccountManagerEvent.ACCOUNT_ADDED | Informs the recipient that a new user account with the specified userID was created. See u98. | |
ACCOUNT_REMOVED | u112 |
|
AccountManagerEvent.ACCOUNT_REMOVED | Informs the recipient that the user account with the specified userID was removed from the server. See u98. | |
JOINED_ROOM_ADDED_TO_CLIENT | u113 |
|
ClientEvent.JOIN_ROOM | Informs the recipient that the specified client joined the specified room. | |
JOINED_ROOM_REMOVED_FROM_CLIENT | u114 |
|
ClientEvent.LEAVE_ROOM | Informs the recipient that the specified client left the specified room. | |
GET_CLIENT_SNAPSHOT_RESULT | u115 |
|
SnapshotEvent.STATUS | Reports the result of a u94 request made by the recipient. |
|
GET_ACCOUNT_SNAPSHOT_RESULT | u116 |
|
SnapshotEvent.STATUS | Reports the result of a u100 request made by the recipient. |
|
OBSERVED_ROOM_ADDED_TO_CLIENT | u117 |
|
ClientEvent.OBSERVE_ROOM | Informs the recipient that the specified client observed the specified room. | |
OBSERVED_ROOM_REMOVED_FROM_CLIENT | u118 |
|
ClientEvent.STOP_OBSERVING_ROOM | Informs the recipient that the specified client stopped observing the specified room. | |
CLIENT_OBSERVED | u119 |
|
ClientEvent.OBSERVE | Informs the recipient that it started observing the specified client. | |
STOPPED_OBSERVING_CLIENT | u120 |
|
ClientEvent.STOP_OBSERVING | Informs the recipient that it stopped observing the specified client. | |
OBSERVE_ACCOUNT_RESULT | u123 |
|
AccountEvent.OBSERVE_RESULT | Reports the result of a user-account observation attempt (u121) made by the recipient. If status is SUCCESS, the client is also sent a separate u124 message. |
|
ACCOUNT_OBSERVED | u124 |
|
AccountEvent.OBSERVE | Informs the recipient that it started observing the specified user account. | |
STOP_OBSERVING_ACCOUNT_RESULT | u125 |
|
AccountEvent.STOP_OBSERVING_RESULT | Reports the result of an attempt by the recipient to stop observing the specified user account (see u122). If status is SUCCESS, the client is also sent a separate u126 message. |
|
STOPPED_OBSERVING_ACCOUNT | u126 |
|
AccountEvent.STOP_OBSERVING | Informs the recipient that it stopped observing the specified user account. | |
ACCOUNTLIST_SNAPSHOT | u127 |
|
AccountManagerEvent.ACCOUNT_ADDED, AccountManagerEvent.ACCOUNT_REMOVED, AccountManagerEvent.SYNCHRONIZE | Provides a list of all user accounts currently registered on the server. See u97. | |
UPDATE_LEVELS_UPDATE | u128 |
|
Informs the receiving client that its update levels for a room have changed. See u64. | ||
CLIENT_OBSERVED_ROOM | u129 |
|
RoomEvent.ADD_OBSERVER | Reports that the specified client has observed the specified room. | |
CLIENT_STOPPED_OBSERVING_ROOM | u130 |
|
RoomEvent.REMOVE_OBSERVER | Reports that the specified client has stopped observing the specified room. | |
ROOM_OCCUPANTCOUNT_UPDATE | u131 |
|
RoomEvent.OCCUPANT_COUNT | Reports the new number of occupants in the room. u131 is sent to clients that have joined or observed a room, and have occupant-count updates enabled (see u64). | |
ROOM_OBSERVERCOUNT_UPDATE | u132 |
|
RoomEvent.OBSERVER_COUNT | Reports the new number of observers in the room. u132 is sent to clients that have joined or observed a room, and have observer-count updates enabled (see u64). | |
ADD_ROLE_RESULT | u134 |
|
AccountEvent.ADD_ROLE_RESULT, AccountEvent.ROLE_ADDED | Reports the result of an add-role attempt (u133) made by the recipient. If status is SUCCESS, and the specified user is logged in, then Union Server updates the _ROLES attribute on the client under which the user logged in. |
|
REMOVE_ROLE_RESULT | u136 |
|
AccountEvent.REMOVE_ROLE_RESULT, AccountEvent.ROLE_REMOVED | Reports the result of a remove-role attempt (u135) made by the recipient. If status is SUCCESS, and the specified user is logged in, then Union Server updates the _ROLES attribute on the client under which the user logged in. |
|
BAN_RESULT | u138 |
|
ClientManagerEvent.BAN_RESULT | Reports the result of a ban attempt (u137) made by the recipient. If status is SUCCESS, connection attempts by any client at the specified address are refused by Union Server. If the original u137 included a clientID and no address, that clientID is returned via u138's clientID. |
|
UNBAN_RESULT | u140 |
|
ClientManagerEvent.UNBAN_RESULT | Reports the result of an unban attempt (u137) made by the recipient. If status is SUCCESS, any previous connection ban on the specified address is lifted. |
|
BANNED_LIST_SNAPSHOT | u142 |
|
ClientManagerEvent.SYNCHRONIZE_BANLIST | Provides a list of addresses currently banned from connecting to the server. A u142 is sent in response to u141 and u143. | |
WATCH_FOR_BANNED_ADDRESSES_RESULT | u144 |
|
ClientManagerEvent.WATCH_FOR_BANNED_ADDRESSES_RESULT | Reports the result of a WATCH_FOR_BANNED_ADDRESSES (u143) request made by the recipient. |
|
STOP_WATCHING_FOR_BANNED_ADDRESSES_RESULT | u146 |
|
ClientManagerEvent.STOP_WATCHING_FOR_BANNED_ADDRESSES_RESULT | Reports the result of a STOP_WATCHING_FOR_BANNED_ADDRESSES (u145) request made by the recipient. |
|
BANNED_ADDRESS_ADDED | u147 |
|
ClientManagerEvent.ADDRESS_BANNED | Informs the recipient that the specified address has been banned from connecting to the server. See u143. | |
BANNED_ADDRESS_REMOVED | u148 |
|
ClientManagerEvent.ADDRESS_UNBANNED | Informs the recipient that the specified address has been unbanned. See u143. | |
KICK_CLIENT_RESULT | u150 |
|
ClientManagerEvent.KICK_RESULT | Reports the result of a KICK_CLIENT (u149) request made by the recipient. |
|
SERVERMODULELIST_SNAPSHOT | u152 |
|
SnapshotEvent.LOAD | Provides a list of server modules currently active on Union Server. A u152 is sent in response to u151. | |
GET_UPC_STATS_SNAPSHOT_RESULT | u155 |
|
SnapshotEvent.STATUS | Reports the result of a GET_UPC_STATS_SNAPSHOT (u154) request made by the recipient. |
|
UPC_STATS_SNAPSHOT | u156 |
|
UPCStatsSnapshot | Provides statistics about UPC messages received by Union Server. A u155 is sent in response to u154. Arguments following lastQueueWaitTime specify an unsorted list of the longest UPC message processing times since either Union Server was started or since the last UPC-statistics reset command (see u157). Any CDATA sections contained within UPCSource fields are escaped according to the rules described under "Nested CDATA". | |
RESET_UPC_STATS_RESULT | u158 |
|
ServerEvent.RESET_UPC_STATS_RESULT | Reports the result of a RESET_UPC_STATS (u157) request made by the recipient. |
|
WATCH_FOR_PROCESSED_UPCS_RESULT | u160 |
|
ServerEvent.WATCH_FOR_PROCESSED_UPCS_RESULT | Reports the result of a WATCH_FOR_PROCESSED_UPCS (u159) request made by the recipient. |
|
PROCESSED_UPC_ADDED | u161 |
|
ServerEvent.UPC_PROCESSED | Informs the recipient that the server processed the UPC message specified by UPCSource. See u160. Any CDATA sections contained within UPCSource are escaped according to the rules described under "Nested CDATA". | |
STOP_WATCHING_FOR_PROCESSED_UPCS_RESULT | u163 |
|
ServerEvent.STOP_WATCHING_FOR_PROCESSED_UPCS_RESULT | Reports the result of a STOP_WATCHING_FOR_PROCESSED_UPCS_RESULT (u162) request made by the recipient. |
|
CONNECTION_REFUSED | u164 |
|
ReactorEvent.CONNECT_REFUSED | Indicates that Union Server refused the requested client connection, typically because the client's address is banned. The reason argument indicates why the client connection was refused. The value of reason is either one of the following known refusal-reason codes, or an arbitrary string supplied by custom module code.
|
|
NODELIST_SNAPSHOT | u166 |
|
NodeListSnapshot | Provides a list of IDs for the cluster nodes currently connected to the server. Each ID is an arbitrary, statistically unique string generated automatically by Union Server. A server's nodeID is guaranteed to be the same for a given server until that server shuts down. u166 is sent in response to u165. | |
GATEWAYS_SNAPSHOT | u168 |
|
GatewaysSnapshot | Provides gateway statistics in response to u167. The list of NUM_CONNECTIONS_CATEGORYn gives the number of connections to the gateway, broken down by connection type. Connection types are determined by each gateway. For example, the built-in gateways for Adobe Flash clients include the connection types "POLICYFILE" (for Flash policy file requests) and "CLIENT" (for connections that are determined to be legitimate Union clients). For every gateway, one of the categories in the NUM_CONNECTIONS_CATEGORYn list is always guaranteed to be "TOTAL". The "TOTAL" connection category indicates the total raw number of lifetime connections to the specified gateway, including all connection types. The list of NUM_CLIENTS_CLIENTTYPEn gives the number of Union clients that have connected to the gateway, broken down by client type. For example, a gateway might have had 150 Reactor (Flash) client connections and 35 Orbiter (JavaScript) client connections. The list of NUM_CLIENTS_UPCVERSIONn gives the number of Union clients that have connected to the gateway, broken down by UPC version. For example, a gateway might have had 25 clients that used UPC version 1.4.0 and 40 clients that used UPC version 1.5.0. The "lifetimeRead..." argument lists the gateway's bandwidth usage. All bandwidth statistics are given in bytes. Bandwidth averages are per second. Intervals are the most recent second at the time of the request. |
Attribute Name | Attribute Scope | Attribute Description |
_CLIENT_TYPE | Global | The Union client type. For example, "Orbiter" or "Reactor". |
_CONNECTION_TYPE | Global | The type of the client's connection to the server. |
_CT | Global | The client's connection time in milliseconds from 1970 format. |
_GATEWAY_ID | Global | The ID of the server gateway to which the client is connected. |
_GATEWAY_TYPE | Global | The type of the server gateway to which the client is connected. |
_IP | Global | The client's IP address, if available. |
_ROLES | Global | The security roles for this client, as an integer whose bits have the following meaning when set:
|
_UL | Room | The client's update levels for the room to which the _UL attribute is scoped. See u64. |
_UPC_VERSION | Global | The UPC protocol version supported by the client. For example, "1.8.2". |
_USERAGENT | Global | A description of the client software application being used to connect to Union. For example, "Flash Player MAC 10,1,53,38 StandAlone (debug, localTrusted); 1.0.0". |