icerpc and multiplexed transports

Lean about the icerpc protocol and multiplexed transports

When you create a client connection to server address icerpc://, you instruct IceRPC to establish a connection that uses the icerpc protocol.

icerpc is an application layer protocol that transmits RPCs (requests and responses) over a multiplexed connection.

We always spell icerpc in lowercase when discussing the icerpc protocol. This avoids confusion with the IceRPC framework.

The multiplexed transport page describes an abstraction for a modern transport that provides independent streams within a connection. The prototypical multiplexed transport is QUIC.

An icerpc connection runs over a multiplexed connection created by a multiplexed transport.

The icerpc protocol sends requests and responses over a multiplexed connection by creating a dedicated bidirectional stream for each request + response pair. It creates a unidirectional stream for each one-way request, since a one-way request has no response.

Since each stream is independent, there is no head-of-line blocking. You can send a mix of large and small requests and responses over the same connection: the large requests and responses won't block or delay the small ones.

icerpc is naturally IceRPC's preferred protocol.

icerpc provides the most direct realization of IceRPC's APIs and features. In particular, IceRPC's request fields, response fields and status codes are transmitted as-is by icerpc. It also supports payload continuations.

There is currently only one standard multiplexed transport: QUIC. Since QUIC is new and not universally available, you may want to use icerpc with a traditional duplex transport such as TCP.

The solution is IceRPC's Slic transport layer. Slic implements the multiplexed transport abstraction over the duplex transport abstraction.

In C#, the default multiplexed transport is Slic over TCP and is called tcp. The following statements all create equivalent icerpc connections.

// Create a client connection with the default multiplexed client transport, Slic over TCP.
using await var clientConnection = new ClientConnection("icerpc://");
// Make sure we use Slic over TCP (correct but redundant).
using await var clientConnection = new ClientConnection("icerpc://");
// Create a new multiplexed client transport with default options.
var clientTransport = new SlicClientTransport(new TcpClientTransport());
using await var clientConnection = new ClientConnection(
multiplexedClientTransport: clientTransport);

Was this page helpful?