Class EndPointFormatter
Provides methods for serialization/deserialization of End
Inherited Members
Namespace: DotNext .Net
Assembly: DotNext.Net.Cluster.dll
Syntax
public static class EndPointFormatter
Remarks
List of supported endpoint types: IPEnd
Properties
| Edit this page View SourceUriEndPointComparer
Gets comparer for Uri
Declaration
[CLSCompliant(false)]
public static IEqualityComparer<EndPoint> UriEndPointComparer { get; }
Property Value
Type | Description |
---|---|
IEquality |
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 |
---|---|---|
End |
endPoint | The value to be serialized. |
Memory |
allocator | The buffer allocator. |
Returns
Type | Description |
---|---|
Memory |
The buffer containing serialized |
ReadEndPoint(ref SequenceReader)
Deserializes endpoint address.
Declaration
public static EndPoint ReadEndPoint(this ref SequenceReader reader)
Parameters
Type | Name | Description |
---|---|---|
Sequence |
reader | The binary reader. |
Returns
Type | Description |
---|---|
End |
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 |
---|---|---|
Buffer |
writer | The output buffer. |
End |
endPoint | The value to be serialized. |
Exceptions
Type | Condition |
---|---|
Argument |
Unsupported type of |