Socket.EndReceiveMessageFrom Method (IAsyncResult, SocketFlags, EndPoint, IPPacketInformation)
Ends a pending asynchronous read from a specific endpoint. This method also reveals more information about the packet than EndReceiveFrom.
Assembly: System (in System.dll)
Public Function EndReceiveMessageFrom ( asyncResult As IAsyncResult, ByRef socketFlags As SocketFlags, ByRef endPoint As EndPoint, <OutAttribute> ByRef ipPacketInformation As IPPacketInformation ) As Integer
An IAsyncResult that stores state information and any user defined data for this asynchronous operation.
A bitwise combination of the SocketFlags values for the received packet.
Return ValueType: System.Int32
If successful, the number of bytes received. If unsuccessful, returns 0.
asyncResult is null
endPoint is null.
asyncResult was not returned by a call to the BeginReceiveMessageFrom method.
was previously called for the asynchronous read.
An error occurred when attempting to access the socket. See the Remarks section for more information.
The Socket has been closed.
If the operation has not completed, this method blocks until it does.
To perform this operation synchronously, use the ReceiveMessageFrom method.
Examine ipPacketInformation if you need to know if the datagram was sent using a unicast, multicast, or broadcast address.
Available since 2.0