Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.Sockets.UdpClient Class Reference

Public Member Functions

 UdpClient ()
 
 UdpClient (AddressFamily family)
 
 UdpClient (int port)
 
 UdpClient (int port, AddressFamily family)
 
 UdpClient (IPEndPoint localEP)
 
void AllowNatTraversal (bool allowed)
 
void Dispose ()
 
IAsyncResult BeginSend (byte[] datagram, int bytes, AsyncCallback? requestCallback, object? state)
 
IAsyncResult BeginSend (byte[] datagram, int bytes, string? hostname, int port, AsyncCallback? requestCallback, object? state)
 
IAsyncResult BeginSend (byte[] datagram, int bytes, IPEndPoint? endPoint, AsyncCallback? requestCallback, object? state)
 
int EndSend (IAsyncResult asyncResult)
 
IAsyncResult BeginReceive (AsyncCallback? requestCallback, object? state)
 
byte[] EndReceive (IAsyncResult asyncResult, ref IPEndPoint? remoteEP)
 
void JoinMulticastGroup (IPAddress multicastAddr)
 
void JoinMulticastGroup (IPAddress multicastAddr, IPAddress localAddress)
 
void JoinMulticastGroup (int ifindex, IPAddress multicastAddr)
 
void JoinMulticastGroup (IPAddress multicastAddr, int timeToLive)
 
void DropMulticastGroup (IPAddress multicastAddr)
 
void DropMulticastGroup (IPAddress multicastAddr, int ifindex)
 
Task< int > SendAsync (byte[] datagram, int bytes)
 
ValueTask< int > SendAsync (ReadOnlyMemory< byte > datagram, CancellationToken cancellationToken=default(CancellationToken))
 
Task< int > SendAsync (byte[] datagram, int bytes, string? hostname, int port)
 
ValueTask< int > SendAsync (ReadOnlyMemory< byte > datagram, string? hostname, int port, CancellationToken cancellationToken=default(CancellationToken))
 
Task< int > SendAsync (byte[] datagram, int bytes, IPEndPoint? endPoint)
 
ValueTask< int > SendAsync (ReadOnlyMemory< byte > datagram, IPEndPoint? endPoint, CancellationToken cancellationToken=default(CancellationToken))
 
Task< UdpReceiveResultReceiveAsync ()
 
ValueTask< UdpReceiveResultReceiveAsync (CancellationToken cancellationToken)
 
 UdpClient (string hostname, int port)
 
void Close ()
 
void Connect (string hostname, int port)
 
void Connect (IPAddress addr, int port)
 
void Connect (IPEndPoint endPoint)
 
byte[] Receive ([NotNull] ref IPEndPoint? remoteEP)
 
int Send (byte[] dgram, int bytes, IPEndPoint? endPoint)
 
int Send (ReadOnlySpan< byte > datagram, IPEndPoint? endPoint)
 
int Send (byte[] dgram, int bytes, string? hostname, int port)
 
int Send (ReadOnlySpan< byte > datagram, string? hostname, int port)
 
int Send (byte[] dgram, int bytes)
 
int Send (ReadOnlySpan< byte > datagram)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

bool Active [get, set]
 
int Available [get]
 
Socket Client [get, set]
 
short Ttl [get, set]
 
bool DontFragment [get, set]
 
bool MulticastLoopback [get, set]
 
bool EnableBroadcast [get, set]
 
bool ExclusiveAddressUse [get, set]
 

Private Member Functions

bool IsAddressFamilyCompatible (AddressFamily family)
 
void CheckForBroadcast (IPAddress ipAddress)
 
bool IsBroadcast (IPAddress address)
 
void ValidateDatagram (byte[] datagram, int bytes, IPEndPoint endPoint)
 
IPEndPoint GetEndpoint (string hostname, int port)
 
void CreateClientSocket ()
 
void ThrowIfDisposed ()
 

Private Attributes

Socket _clientSocket
 
bool _active
 
readonly byte[] _buffer = new byte[65536]
 
AddressFamily _family = AddressFamily.InterNetwork
 
bool _disposed
 
bool _isBroadcast
 

Detailed Description

Definition at line 8 of file UdpClient.cs.


The documentation for this class was generated from the following file: