Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space IceMaster and version 3.7.1

...

Table of Contents
maxLevel3

Encoding for

...

Proxy

...

Options

The encoding format of proxies changed in version 1.1.

...

Proxy Encoding version 1.0

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 proxy options followed by endpoint parametersendpoints.

The general proxy parameters options are encoded as if they were members of the following structure:

Code Block
languageslice
titleSlice
struct ProxyData
{
    Ice::Identity id;
    Ice::StringSeq facet;
    byte mode;
    bool secure;
}

The general proxy parameters options are described in the table below:

ParameterOption

Description

id

The object identity

facet

The facet name (zero- or one-element sequence)

mode

The proxy mode (0=twoway, 1=oneway, 2=batch oneway, 3=datagram, 4=batch datagram)

secure

true if secure endpoints are required, otherwise false

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.

Ztop

...

Proxy Encoding version 1.1

Version 1.1 of the encoding appends adds two attributes options to the existing proxy parameters options in version 1.0: protocol and encoding versions. The general proxy parameters options are encoded as if they were members of the following structure:

Code Block
languageslice
titleSlice
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;
}

The additional parameters options are described in the table below:

ParameterOption

Description

protocol

The maximum protocol version supported by the server. Currently this value is always 1.0.

encoding

The maximum encoding version supported by the server.

The encoding for UDP endpoints also changed in version 1.1.

Ztop

Encoding for

...

Endpoints

A proxy optionally contains an endpoint list or an adapter identifier, but not both:

  • If a proxy contains endpoints, they are encoded immediately following the general parametersproxy options. A size specifying the number of endpoints is encoded first, followed by the endpoints. Each endpoint is encoded as a short specifying the endpoint type (1=TCP, 2=SSL, 3=UDP, 4=WS, 5=WSS), followed by an encapsulation of type-specific parametersendpoint options. The type-specific parameters options for TCP, UDP, SSL, WS and WSS are presented in the sections that follow.
  • If a proxy does not have endpoints, a single byte with value 0 immediately follows the general parameters proxy options and a string representing the object adapter identifier is encoded immediately following the zero byte.
  • For a proxy to a well-known object, which has neither endpoints nor an object adapter identifier, a single byte with value 0 immediately follows the general parameters proxy options and an empty string is encoded immediately following the zero byte.

Type-specific endpoint parameters options are encapsulated because a receiver may not be capable of decoding them. For example, a receiver can only decode SSL endpoint parameters options 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 options for an endpoint. Encapsulation of the parameters into endpoint into an opaque endpoint allows the receiver to do this.

Ztop
 
Anchor
tcp
tcp

Encoding for TCP

...

Endpoints

A TCP endpoint is encoded as an encapsulation containing the following structure:

Code Block
languageslice
titleSlice
struct TCPEndpointData
{
    string host;
    int port;
    int timeout;
    bool compress;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

host

The server host (a host name or IP address)

port

The server port (1-65535)

timeout

The timeout in milliseconds for socket operations

compress

true if compression should be used (if possible), otherwise false

Ztop
 
Anchor
udp
udp

Encoding for UDP

...

Endpoints

The encoding format of UDP endpoints changed in version 1.1.

...

Code Block
languageslice
titleSlice
struct UDPEndpointData
{
    string host;
    int port;
    byte protocolMajor;
    byte protocolMinor;
    byte encodingMajor;
    byte encodingMinor;
    bool compress;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

host

The server host (a host name or IP address)

port

The server port (1-65535)

protocolMajor

The major protocol version supported by the endpoint

protocolMinor

The highest minor protocol version supported by the endpoint

encodingMajor

The major encoding version supported by the endpoint

encodingMinor

The highest minor encoding version supported by the endpoint

compress

true if compression should be used (if possible), otherwise false

...

Version 1.1 of the encoding omits the protocol and encoding versions because these attributes options are handled as general proxy parameters insteadoptions instead: 

Code Block
languageslice
titleSlice
struct UDPEndpointData
{
    string host;
    int port;
    bool compress;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

host

The server host (a host name or IP address)

port

The server port (1-65535)

compress

true if compression should be used (if possible), otherwise false

Ztop
 
Anchor
ssl
ssl

Encoding for SSL

...

Endpoints

An SSL endpoint is encoded as an encapsulation containing the following structure:

Code Block
languageslice
titleSlice
struct SSLEndpointData
{
    string host;
    int port;
    int timeout;
    bool compress;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

host

The server host (a host name or IP address)

port

The server port (1-65535)

timeout

The timeout  in milliseconds for socket operations

compress

true if compression should be used (if possible), otherwise false

Ztop

Encoding for WS

...

Endpoints

A WebSocket endpoint is encoded as an encapsulation containing the following structure:

Code Block
languageslice
titleSlice
struct WSEndpointData
{
    string host;
    int port;
    int timeout;
    bool compress;
    string resource;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

host

The server host (a host name or IP address)

port

The server port (1-65535)

timeout

The timeout  in milliseconds for socket operations

compress

true if compression should be used (if possible), otherwise false

resource

A URI representing the web server resource associated with this endpoint

Ztop

Encoding for WSS

...

Endpoints

A secure WebSocket endpoint is encoded as an encapsulation containing the following structure:

Code Block
languageslice
titleSlice
struct WSSEndpointData
{
    string host;
    int port;
    int timeout;
    bool compress;
    string resource;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

host

The server host (a host name or IP address)

port

The server port (1-65535)

timeout

The timeout  in milliseconds for socket operations

compress

true if compression should be used (if possible), otherwise false

resource

A URI representing the web server resource associated with this endpoint

Ztop

Encoding for BT

...

Endpoints

A Bluetooth endpoint is encoded as an encapsulation containing the following structure:

Code Block
languageslice
titleSlice
struct BTEndpointData
{
    string addr;
    string uuid;
    int timeout;
    bool compress;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

addr

The Bluetooth address of the server

uuid

The UUID of the target service

timeout

The timeout  in milliseconds for socket operations

compress

true if compression should be used (if possible), otherwise false

Ztop

Encoding for BTS

...

Endpoints

A secure Bluetooth endpoint is encoded as an encapsulation containing the following structure:

Code Block
languageslice
titleSlice
struct BTSEndpointData
{
    string addr;
    string uuid;
    int timeout;
    bool compress;
}

The endpoint parameters options are described in the following table.

ParameterOption

Description

addr

The Bluetooth address of the server

uuid

The UUID of the target service

timeout

The timeout  in milliseconds for socket operations

compress

true if compression should be used (if possible), otherwise false

...