BeginJoinGroup Method
Collapse the table of content
Expand the table of content

UdpSingleSourceMulticastClient.BeginJoinGroup Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Binds the socket and begins a join operation to the multicast group to allow datagrams to be received from a single source address.

Namespace:  System.Net.Sockets
Assembly:  System.Net (in System.Net.dll)

'Declaration
Public Function BeginJoinGroup ( _
	callback As AsyncCallback, _
	state As Object _
) As IAsyncResult

Parameters

callback
Type: System.AsyncCallback
A callback method to invoke when the operation completes.
state
Type: System.Object
Optional state information to pass to the callback method for this operation.

Return Value

Type: System.IAsyncResult
An IAsyncResult that references this operation.

ExceptionCondition
InvalidOperationException

The multicast group has already been joined or a join operation is currently in progress.

ObjectDisposedException

The UdpSingleSourceMulticastClient has been disposed.

SocketException

An error occurred when attempting to access the socket. See the Remarks section for more information.

The BeginJoinGroup method binds a UDP multicast socket to a local port and joins a multicast group to allow datagrams to be received from a single source address. The multicast group address, single source address, and local port to bind to are specified in the UdpSingleSourceMulticastClient constructor.

The method specified in the callback parameter is invoked when the operation to join the multicast group has completed.

If required by the runtime, the BeginJoinGroup method also performs a policy check to verify that the client is allowed to access the multicast group. If the client is not allowed access, a SocketException is thrown with SocketError.AccessDenied.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft