SocketOptionLevel 列挙体とは? わかりやすく解説

SocketOptionLevel 列挙体

Socket.SetSocketOption メソッドと Socket.GetSocketOption メソッドソケット オプション レベル定義します

名前空間: System.Net.Sockets
アセンブリ: System (system.dll 内)
構文構文

Dim instance As SocketOptionLevel
public enum SocketOptionLevel
public enum class SocketOptionLevel
public enum SocketOptionLevel
public enum SocketOptionLevel
メンバメンバ
解説解説

SocketOptionLevel 列挙体は、Socket.SetSocketOption メソッドSocket.GetSocketOption メソッドに渡すことができるソケット オプション レベル定義します。SocketOptionName 列挙値は SocketOptionLevel によってグループ化されます

メモ   Windows XPIPv6使用するには、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);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.Net.Sockets 名前空間
Socket クラス
SocketOptionName



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SocketOptionLevel 列挙体」の関連用語

SocketOptionLevel 列挙体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SocketOptionLevel 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS