Class EndPointFormatter
Provides methods for serialization/deserialization of EndPoint derived types.
Inherited Members
Namespace: DotNext.Net
Assembly: DotNext.Net.Cluster.dll
Syntax
public static class EndPointFormatter
Remarks
List of supported endpoint types: IPEndPoint, DnsEndPoint, HttpEndPoint, UnixDomainSocketEndPoint, UriEndPoint.
Properties
| Edit this page View SourceUriEndPointComparer
Gets comparer for UriEndPoint.
Declaration
[CLSCompliant(false)]
public static IEqualityComparer<EndPoint> UriEndPointComparer { get; }
Property Value
Type | Description |
---|---|
IEqualityComparer<EndPoint> |
Methods
| Edit this page View SourceGetBytes(EndPoint, MemoryAllocator<byte>?)
Serializes endpoint address to the buffer.
Declaration
public static MemoryOwner<byte> GetBytes(this EndPoint endPoint, MemoryAllocator<byte>? allocator = null)
Parameters
Type | Name | Description |
---|---|---|
EndPoint | endPoint | The value to be serialized. |
MemoryAllocator<byte> | allocator | The buffer allocator. |
Returns
Type | Description |
---|---|
MemoryOwner<byte> | The buffer containing serialized |
ReadEndPoint(ref SequenceReader)
Deserializes endpoint address.
Declaration
public static EndPoint ReadEndPoint(this ref SequenceReader reader)
Parameters
Type | Name | Description |
---|---|---|
SequenceReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
EndPoint | The deserialized network endpoint address. |
WriteEndPoint(ref BufferWriterSlim<byte>, EndPoint)
Serializes endpoint address to the buffer.
Declaration
public static void WriteEndPoint(this ref BufferWriterSlim<byte> writer, EndPoint endPoint)
Parameters
Type | Name | Description |
---|---|---|
BufferWriterSlim<byte> | writer | The output buffer. |
EndPoint | endPoint | The value to be serialized. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Unsupported type of |