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 and4062
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
Ice
Gets the ice protocol.
public static Protocol Ice { get; }
Property Value
IceRpc
Gets the icerpc protocol.
public static Protocol IceRpc { get; }
Property Value
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
stringThe 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)