语言

UdpAnySourceMulticastClient.EndReceiveFromGroup 方法

定义

注意

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

完成从联接的多播组接收数据包的异步操作,并提供接收的信息。

public:
 int EndReceiveFromGroup(IAsyncResult ^ result, [Runtime::InteropServices::Out] System::Net::IPEndPoint ^ % source);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public int EndReceiveFromGroup(IAsyncResult result, out System.Net.IPEndPoint source);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.EndReceiveFromGroup : IAsyncResult * IPEndPoint -> int
Public Function EndReceiveFromGroup (result As IAsyncResult, ByRef source As IPEndPoint) As Integer

参数

result
IAsyncResult

异步接收操作的结果。

source
IPEndPoint

从中接收数据包的源终结点。

返回

传递给 BeginReceiveFromGroup(Byte[], Int32, Int32, AsyncCallback, Object) 方法的缓冲区参数中存储的消息的长度(以字节为单位)。

属性

例外

result 是空引用(Visual Basic 中没有任何内容)。

多播组尚未加入。

尝试访问套接字时出错。

注解

该方法 EndReceiveFromGroup 完成异步操作以从多播组接收数据包。

如果在执行接收操作时出现套接字故障,则会引发一个 SocketException 。 收到的错误被指定为枚举的成员 SocketError 。

适用于