Skip to content

[QUIC] Use shared SocketAddress code in QUIC #32068

@scalablecory

Description

@scalablecory

Instead of reimplementing sockaddr serialization, we should use the existing EndPoint -> SocketAddress -> byte[] logic in System.Net.Primitives.

internal static SOCKADDR_INET IPEndPointToINet(IPEndPoint endpoint)
{
SOCKADDR_INET socketAddress = default;
byte[] buffer = endpoint.Address.GetAddressBytes();
if (endpoint.Address != IPAddress.Any && endpoint.Address != IPAddress.IPv6Any)

Metadata

Metadata

Assignees

Labels

area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions