On this page:
The encoding format of proxies changed in version 1.1.
The first component of an encoded proxy is a value of type Ice::Identity. If the proxy is a nil value, the category and name members are empty strings, and no additional data is encoded. The encoding for a non-null proxy consists of general parameters followed by endpoint parameters.
The general proxy parameters are encoded as if they were members of the following structure:
{zcode:slice}
struct ProxyData {
Ice::Identity id;
Ice::StringSeq facet;
byte mode;
bool secure;
};
{zcode} |
The general proxy parameters are described in the table below:
Parameter | Description |
|---|---|
| The object identity |
| The facet name (zero- or one-element sequence) |
| The proxy mode ( |
|
|
The facet field has either zero elements or one element. An empty sequence denotes the default facet, and a one-element sequence provides the facet name in its first member. If a receiver receives a proxy with a facet field with more than one element, it must throw a ProxyUnmarshalException.
Version 1.1 of the encoding appends two attributes to the existing proxy parameters in version 1.0: protocol and encoding versions. The general proxy parameters are encoded as if they were members of the following structure:
{zcode:slice}
struct ProtocolVersion {
byte major;
byte minor;
};
struct EncodingVersion {
byte major;
byte minor;
};
struct ProxyData {
Ice::Identity id;
Ice::StringSeq facet;
byte mode;
bool secure;
ProtocolVersion protocol;
EncodingVersion encoding;
};
{zcode} |
The additional parameters are described in the table below:
Parameter | Description |
|---|---|
| The maximum protocol version supported by the server. Currently this value is always 1.0. |
| The maximum encoding version supported by the server. |
The encoding for UDP endpoints also changed in version 1.1.
A proxy optionally contains an endpoint list or an adapter identifier, but not both:
short specifying the endpoint type (1=TCP, 2=SSL, 3=UDP), followed by an encapsulation of type-specific parameters. The type-specific parameters for TCP, UDP, and SSL are presented in the sections that follow.0 immediately follows the general parameters and a string representing the object adapter identifier is encoded immediately following the zero byte.0 immediately follows the general parameters and an empty string is encoded immediately following the zero byte.Type-specific endpoint parameters are encapsulated because a receiver may not be capable of decoding them. For example, a receiver can only decode SSL endpoint parameters if it is configured with the IceSSL plug-in. However, the receiver must be able to re-encode the proxy with all of its original endpoints, in the order they were received, even if the receiver does not understand the type-specific parameters for an endpoint. Encapsulation of the parameters into an opaque endpoint allows the receiver to do this.
A TCP endpoint is encoded as an encapsulation containing the following structure:
{zcode:slice}
struct TCPEndpointData {
string host;
int port;
int timeout;
bool compress;
};
{zcode} |
The endpoint parameters are described in the following table.
Parameter | Description |
|---|---|
| The server host (a host name or IP address) |
| The server port ( |
| The timeout in milliseconds for socket operations |
|
|
The encoding format of UDP endpoints changed in version 1.1.
A UDP endpoint is encoded as an encapsulation containing the following structure:
{zcode:slice}
struct UDPEndpointData {
string host;
int port;
byte protocolMajor;
byte protocolMinor;
byte encodingMajor;
byte encodingMinor;
bool compress;
};
{zcode} |
The endpoint parameters are described in the following table.
Parameter | Description |
|---|---|
| The server host (a host name or IP address) |
| The server port ( |
| The major protocol version supported by the endpoint |
| The highest minor protocol version supported by the endpoint |
| The major encoding version supported by the endpoint |
| The highest minor encoding version supported by the endpoint |
|
|
Version 1.1 of the encoding omits the protocol and encoding versions because these attributes are handled as general proxy parameters instead:
{zcode:slice}
struct UDPEndpointData {
string host;
int port;
bool compress;
};
{zcode} |
The endpoint parameters are described in the following table.
Parameter | Description |
|---|---|
| The server host (a host name or IP address) |
| The server port ( |
|
|
An SSL endpoint is encoded as an encapsulation containing the following structure:
{zcode:slice}
struct SSLEndpointData {
string host;
int port;
int timeout;
bool compress;
};
{zcode} |
The endpoint parameters are described in the following table.
Parameter | Description |
|---|---|
| The server host (a host name or IP address) |
| The server port ( |
| The timeout in milliseconds for socket operations |
|
|