Table of Contents

Class Protocol

Namespace
IceRpc
Assembly
IceRpc.dll

Represents an RPC protocol supported by IceRPC.

public class Protocol
Inheritance
Protocol
Inherited Members

Properties

DefaultPort

Gets the default port for this protocol.

public ushort DefaultPort { get; }

Property Value

ushort

The default port value. Defaults to 4061 for the ice protocol and 4062 for the icerpc protocol.

HasFields

Gets a value indicating whether or not this protocol supports arbitrary application-defined fields in request and response headers.

public bool HasFields { get; }

Property Value

bool

true if the protocol supports arbitrary fields; otherwise, false.

Ice

Gets the ice protocol.

public static Protocol Ice { get; }

Property Value

Protocol

The Protocol instance for the ice protocol.

IceRpc

Gets the icerpc protocol.

public static Protocol IceRpc { get; }

Property Value

Protocol

The Protocol instance for the icerpc protocol.

Name

Gets the name of this protocol.

public string Name { get; }

Property Value

string

The protocol name.

Methods

Parse(string)

Parses a string into a protocol.

public static Protocol Parse(string name)

Parameters

name string

The name of the protocol.

Returns

Protocol

A protocol with the given name in lowercase.

Exceptions

FormatException

Thrown when name is not ice or icerpc.

ToString()

Converts this protocol into a string.

public override string ToString()

Returns

string

The name of the protocol.

TryParse(string, out Protocol?)

Tries to parse a string into a protocol.

public static bool TryParse(string name, out Protocol? protocol)

Parameters

name string

The name of the protocol.

protocol Protocol

The protocol parsed from the name.

Returns

bool

true when name was successfully parsed into a protocol; otherwise, false.