Socket.ReceiveMessageFrom メソッド
アセンブリ: System (system.dll 内)

Public Function ReceiveMessageFrom ( _ buffer As Byte(), _ offset As Integer, _ size As Integer, _ ByRef socketFlags As SocketFlags, _ ByRef remoteEP As EndPoint, _ <OutAttribute> ByRef ipPacketInformation As IPPacketInformation _ ) As Integer
Dim instance As Socket Dim buffer As Byte() Dim offset As Integer Dim size As Integer Dim socketFlags As SocketFlags Dim remoteEP As EndPoint Dim ipPacketInformation As IPPacketInformation Dim returnValue As Integer returnValue = instance.ReceiveMessageFrom(buffer, offset, size, socketFlags, remoteEP, ipPacketInformation)
public int ReceiveMessageFrom ( byte[] buffer, int offset, int size, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation )
public: int ReceiveMessageFrom ( array<unsigned char>^ buffer, int offset, int size, SocketFlags% socketFlags, EndPoint^% remoteEP, [OutAttribute] IPPacketInformation% ipPacketInformation )
public int ReceiveMessageFrom ( byte[] buffer, int offset, int size, /** @ref */ SocketFlags socketFlags, /** @ref */ EndPoint remoteEP, /** @attribute OutAttribute() */ /** @ref */ IPPacketInformation ipPacketInformation )
戻り値
受信したバイト数。

例外の種類 | 条件 |
---|---|
ArgumentNullException | buffer が null 参照 (Visual Basic では Nothing) です。 または remoteEP が null 参照 (Visual Basic では Nothing) です。 |
ArgumentOutOfRangeException | または または または |
SocketException | socketFlags が、値の有効な組み合わせではありません。 または LocalEndPoint プロパティが設定されていませんでした。 または .NET Framework が、AMD 64 ビット プロセッサ上で実行されています。 または |
ObjectDisposedException | |
NotSupportedException | Windows 2000 以前のオペレーティング システムです。このメソッドを使用するには、Windows XP が必要です。 |

ReceiveMessageFrom メソッドは、buffer パラメータにデータを読み込み、正常に読み込まれたバイト数を返し、データの送信元のリモート ホスト エンドポイントと受信パケットに関する情報をキャプチャします。
データグラムが、ユニキャスト、マルチキャスト、またはブロードキャストのどれを使用して送信されたのかを区別する必要がある場合は、ipPacketInformation を調べます。
![]() |
---|
ReceiveFrom に使用する EndPoint の AddressFamily は、SendTo に使用する EndPoint の AddressFamily と一致させる必要があります。 |


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSocket.ReceiveMessageFrom メソッドを検索する場合は、下記のリンクをクリックしてください。

- Socket.ReceiveMessageFrom メソッドのページへのリンク