Union Handshake

When a Union client connects to Union server, it transmits and receives a standard set of UPC messages known as the Union handshake. The Union handshake sets up the client by assigning its initial attributes and clientID. All client SDKs must fulfill the handshake according to the rules described below. Complete documentation for the UPC messages referenced in the following description is available at the UPC Specification.

1. Client sends client a u65 message (CLIENT_HELLO) including the client name, description, and supported UPC version. For example:

<U>
  <M>u65</M>
  <L>
    <A>Reactor</A>
    <A>Flash Player MAC 10,0,2,54 StandAlone (debug, localTrusted);
       1.0.0 (Build 987)</A>
    <A>1.8.0</A>
  </L>
</U>

2. Client receives a u66 message (SERVER_HELLO) including the server version, client's assigned session ID, server's supported UPC version, and a flag indicating whether the client and server's protocol versions are compatible. For example:

<U>
  <M>u66</M>
  <L>
    <A><![CDATA[Union Server Pro 1.0.0 (build 408)]]></A>
    <A>3dd00bf8-5e4a-4c52-9202-09e4f4db1139</A>
    <A>1.8.0</A>
    <A>true</A>
  </L>
</U>

3. Client receives a u29 message (CLIENT_METADATA) indicating the client's assigned client ID. For example:

<U>
  <M>u29</M>
  <L>
    <A>52110</A>
  </L>
</U>

4. Client receives a series of u8 messages (CLIENT_ATTR_UPDATE) specifying the client's initial global attributes. By default, each client is assigned the following attributes:

  • _CT: the client's connection time according to the server's clock, in milliseconds from 1970 format
  • _IP: the client's own IP address

For example:

<U>
  <M>u8</M>
  <L>
    <A><![CDATA[]]></A>
    <A>52110</A>
    <A><![CDATA[]]></A>
    <A><![CDATA[_CT]]></A>
    <A><![CDATA[1272006786719]]></A>
    <A>36</A>
  </L>
</U>

<U>
  <M>u8</M>
  <L>
    <A><![CDATA[]]></A>
    <A>52110</A>
    <A><![CDATA[]]></A>
    <A><![CDATA[_IP]]></A>
    <A><![CDATA[99.233.233.127]]></A>
    <A>32</A>
  </L>
</U>

5. Client receives a u63 message (CLIENT_READY) indicating that the client setup process has completed and the client is officially ready for use. For example:

<U>
  <M>u63</M>
  <L/>
</U>