Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryWriteBytes()

bool System.Net.IPAddress.TryWriteBytes ( Span< byte > destination,
out int bytesWritten )
inlineinherited

Definition at line 334 of file IPAddress.cs.

335 {
336 if (IsIPv6)
337 {
338 if (destination.Length < 16)
339 {
340 bytesWritten = 0;
341 return false;
342 }
344 bytesWritten = 16;
345 }
346 else
347 {
348 if (destination.Length < 4)
349 {
350 bytesWritten = 0;
351 return false;
352 }
354 bytesWritten = 4;
355 }
356 return true;
357 }
void WriteIPv4Bytes(Span< byte > destination)
Definition IPAddress.cs:371
void WriteIPv6Bytes(Span< byte > destination)
Definition IPAddress.cs:360

References System.destination, System.Net.IPAddress.IsIPv6, System.Net.IPAddress.WriteIPv4Bytes(), and System.Net.IPAddress.WriteIPv6Bytes().

Referenced by System.Net.Internals.SocketAddress.SocketAddress(), System.Net.SocketAddress.SocketAddress(), System.Net.Http.SocksHelper.EstablishSocks4TunnelAsync(), and System.Net.Quic.Implementations.MsQuic.Internal.MsQuicAddressHelpers.IPEndPointToINet().