Show / Hide Table of Contents

Class EndPointFormatter

Provides methods for serialization/deserialization of EndPoint derived types.

Inheritance
object
EndPointFormatter
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

UriEndPointComparer

Gets comparer for UriEndPoint.

Declaration
[CLSCompliant(false)]
public static IEqualityComparer<EndPoint> UriEndPointComparer { get; }
Property Value
Type Description
IEqualityComparer<EndPoint>

Methods

| Edit this page View Source

GetBytes(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 endPoint.

| Edit this page View Source

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.

| Edit this page View Source

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 endPoint.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾