PingReply.Buffer プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PingReply.Buffer プロパティの意味・解説 

PingReply.Buffer プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

ICMP (インターネット コントロール メッセージ プロトコル) エコー応答メッセージ受信したデータバッファ取得します

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

解説解説
使用例使用例

ICMP エコー要求同期的送信し、このプロパティによって返されるバッファサイズ表示するコード例次に示します

public static void ComplexPing
 ()
{
    Ping pingSender = new Ping ();

    // Create a buffer of 32 bytes of data to be transmitted.
    string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    byte[] buffer = Encoding.ASCII.GetBytes (data);

    // Wait 10 seconds for a reply.
    int timeout = 10000;

    // Set options for transmission:
    // The data can go through 64 gateways or routers
    // before it is destroyed, and the data packet
    // cannot be fragmented.
    PingOptions options = new PingOptions (64, true);

    // Send the request.
    PingReply reply = pingSender.Send ("www.contoso.com", timeout, buffer,
 options);

    if (reply.Status == IPStatus.Success)
    {
        Console.WriteLine ("Address: {0}", reply.Address.ToString ());
        Console.WriteLine ("RoundTrip time: {0}", reply.RoundtripTime);
        Console.WriteLine ("Time to live: {0}", reply.Options.Ttl);
        Console.WriteLine ("Don't fragment: {0}", reply.Options.DontFragment);
        Console.WriteLine ("Buffer size: {0}", reply.Buffer.Length);
    }
    else
    {
        Console.WriteLine (reply.Status);
    }
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PingReply クラス
PingReply メンバ
System.Net.NetworkInformation 名前空間



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

辞書ショートカット

すべての辞書の索引

PingReply.Buffer プロパティのお隣キーワード
検索ランキング

   

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



PingReply.Buffer プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS