SocketOptionLevel 列挙体
アセンブリ: System (system.dll 内)

Public Enumeration SocketOptionLevel

メンバ名 | 説明 | |
---|---|---|
![]() | IP | Socket オプションは IP ソケットだけに適用されます。 |
![]() | IPv6 | Socket オプションは IPv6 ソケットだけに適用されます。 |
![]() | Socket | Socket オプションはすべてのソケットに適用されます。 |
![]() | Tcp | Socket オプションは TCP ソケットだけに適用されます。 |
![]() | Udp | Socket オプションは UDP ソケットだけに適用されます。 |

SocketOptionLevel 列挙体は、Socket.SetSocketOption メソッドと Socket.GetSocketOption メソッドに渡すことができるソケット オプション レベルを定義します。SocketOptionName 列挙値は SocketOptionLevel によってグループ化されます。
メモ Windows XP で IPv6 を使用するには、Advanced Networking Pack for Windows XP をインストールします。

この列挙体を使用してソケット オプションを設定する例を次に示します。
'Send operations will time-out if confirmation is ' not received within 1000 milliseconds. s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, 1000) ' The socket will linger for 10 seconds after Socket.Close is called. Dim lingerOption As New LingerOption(True, 10) s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, lingerOption)
// Send operations will time-out if confirmation // is not received within 1000 milliseconds. s.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.SendTimeout, 1000); // The socket will linger for 10 seconds after Socket.Close is called. LingerOption lingerOption = new LingerOption (true, 10); s.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.Linger, lingerOption);
// Specifies that send operations will time-out // if confirmation is not received within 1000 milliseconds. s->SetSocketOption( SocketOptionLevel::Socket, SocketOptionName::SendTimeout, 1000 ); // Specifies that the Socket will linger for 10 seconds after Close is called. LingerOption^ lingerOption = gcnew LingerOption( true,10 ); s->SetSocketOption( SocketOptionLevel::Socket, SocketOptionName::Linger, lingerOption );
// Send operations will time-out if confirmation // is not received within 1000 milliseconds. s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, 1000); // The socket will linger for 10 seconds after Socket.Close is called. LingerOption lingerOption = new LingerOption(true, 10); s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, lingerOption);

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


Weblioに収録されているすべての辞書からSocketOptionLevel 列挙体を検索する場合は、下記のリンクをクリックしてください。

- SocketOptionLevel 列挙体のページへのリンク