C# Class System.Net.Sockets.UdpClient

Inheritance: IDisposable
Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
AllowNatTraversal ( bool allowed ) : void
BeginReceive ( AsyncCallback requestCallback, object state ) : IAsyncResult
BeginSend ( byte datagram, int bytes, AsyncCallback requestCallback, object state ) : IAsyncResult
BeginSend ( byte datagram, int bytes, IPEndPoint endPoint, AsyncCallback requestCallback, object state ) : IAsyncResult
BeginSend ( byte datagram, int bytes, string hostname, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
Dispose ( ) : void
DropMulticastGroup ( IPAddress multicastAddr ) : void
DropMulticastGroup ( IPAddress multicastAddr, int ifindex ) : void
EndReceive ( IAsyncResult asyncResult, IPEndPoint &remoteEP ) : byte[]
EndSend ( IAsyncResult asyncResult ) : int
JoinMulticastGroup ( IPAddress multicastAddr ) : void
JoinMulticastGroup ( IPAddress multicastAddr, IPAddress localAddress ) : void
JoinMulticastGroup ( IPAddress multicastAddr, int timeToLive ) : void
JoinMulticastGroup ( int ifindex, IPAddress multicastAddr ) : void
ReceiveAsync ( ) : Task
SendAsync ( byte datagram, int bytes ) : Task
SendAsync ( byte datagram, int bytes, IPEndPoint endPoint ) : Task
SendAsync ( byte datagram, int bytes, string hostname, int port ) : Task
UdpClient ( ) : System.Diagnostics
UdpClient ( AddressFamily family ) : System.Diagnostics
UdpClient ( IPEndPoint localEP ) : System.Diagnostics
UdpClient ( int port ) : System.Diagnostics
UdpClient ( int port, AddressFamily family ) : System.Diagnostics

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
CheckForBroadcast ( IPAddress ipAddress ) : void
CreateClientSocket ( ) : void
FreeResources ( ) : void
IsBroadcast ( IPAddress address ) : bool

Method Details

AllowNatTraversal() public method

public AllowNatTraversal ( bool allowed ) : void
allowed bool
return void

BeginReceive() public method

public BeginReceive ( AsyncCallback requestCallback, object state ) : IAsyncResult
requestCallback AsyncCallback
state object
return IAsyncResult

BeginSend() public method

public BeginSend ( byte datagram, int bytes, AsyncCallback requestCallback, object state ) : IAsyncResult
datagram byte
bytes int
requestCallback AsyncCallback
state object
return IAsyncResult

BeginSend() public method

public BeginSend ( byte datagram, int bytes, IPEndPoint endPoint, AsyncCallback requestCallback, object state ) : IAsyncResult
datagram byte
bytes int
endPoint IPEndPoint
requestCallback AsyncCallback
state object
return IAsyncResult

BeginSend() public method

public BeginSend ( byte datagram, int bytes, string hostname, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
datagram byte
bytes int
hostname string
port int
requestCallback AsyncCallback
state object
return IAsyncResult

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DropMulticastGroup() public method

public DropMulticastGroup ( IPAddress multicastAddr ) : void
multicastAddr IPAddress
return void

DropMulticastGroup() public method

public DropMulticastGroup ( IPAddress multicastAddr, int ifindex ) : void
multicastAddr IPAddress
ifindex int
return void

EndReceive() public method

public EndReceive ( IAsyncResult asyncResult, IPEndPoint &remoteEP ) : byte[]
asyncResult IAsyncResult
remoteEP IPEndPoint
return byte[]

EndSend() public method

public EndSend ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

JoinMulticastGroup() public method

public JoinMulticastGroup ( IPAddress multicastAddr ) : void
multicastAddr IPAddress
return void

JoinMulticastGroup() public method

public JoinMulticastGroup ( IPAddress multicastAddr, IPAddress localAddress ) : void
multicastAddr IPAddress
localAddress IPAddress
return void

JoinMulticastGroup() public method

public JoinMulticastGroup ( IPAddress multicastAddr, int timeToLive ) : void
multicastAddr IPAddress
timeToLive int
return void

JoinMulticastGroup() public method

public JoinMulticastGroup ( int ifindex, IPAddress multicastAddr ) : void
ifindex int
multicastAddr IPAddress
return void

ReceiveAsync() public method

public ReceiveAsync ( ) : Task
return Task

SendAsync() public method

public SendAsync ( byte datagram, int bytes ) : Task
datagram byte
bytes int
return Task

SendAsync() public method

public SendAsync ( byte datagram, int bytes, IPEndPoint endPoint ) : Task
datagram byte
bytes int
endPoint IPEndPoint
return Task

SendAsync() public method

public SendAsync ( byte datagram, int bytes, string hostname, int port ) : Task
datagram byte
bytes int
hostname string
port int
return Task

UdpClient() public method

public UdpClient ( ) : System.Diagnostics
return System.Diagnostics

UdpClient() public method

public UdpClient ( AddressFamily family ) : System.Diagnostics
family AddressFamily
return System.Diagnostics

UdpClient() public method

public UdpClient ( IPEndPoint localEP ) : System.Diagnostics
localEP IPEndPoint
return System.Diagnostics

UdpClient() public method

public UdpClient ( int port ) : System.Diagnostics
port int
return System.Diagnostics

UdpClient() public method

public UdpClient ( int port, AddressFamily family ) : System.Diagnostics
port int
family AddressFamily
return System.Diagnostics