UdpStatistics クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザー データグラム プロトコル (UDP) 統計データを提供します。
public ref class UdpStatistics abstract
public abstract class UdpStatistics
type UdpStatistics = class
Public MustInherit Class UdpStatistics
- 継承
-
UdpStatistics
例
次のコード例では、指定したアドレス ファミリの UDP 統計情報を表示します。
public static void ShowUdpStatistics(NetworkInterfaceComponent version)
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
UdpStatistics udpStat = null;
switch (version)
{
case NetworkInterfaceComponent.IPv4:
udpStat = properties.GetUdpIPv4Statistics();
Console.WriteLine("UDP IPv4 Statistics");
break;
case NetworkInterfaceComponent.IPv6:
udpStat = properties.GetUdpIPv6Statistics();
Console.WriteLine("UDP IPv6 Statistics");
break;
default:
throw new ArgumentException("version");
// break;
}
Console.WriteLine(" Datagrams Received ...................... : {0}",
udpStat.DatagramsReceived);
Console.WriteLine(" Datagrams Sent .......................... : {0}",
udpStat.DatagramsSent);
Console.WriteLine(" Incoming Datagrams Discarded ............ : {0}",
udpStat.IncomingDatagramsDiscarded);
Console.WriteLine(" Incoming Datagrams With Errors .......... : {0}",
udpStat.IncomingDatagramsWithErrors);
Console.WriteLine(" UDP Listeners ........................... : {0}",
udpStat.UdpListeners);
Console.WriteLine("");
}
注釈
このクラスのインスタンスは、アプリケーションに UDP トラフィック情報へのアクセスを許可するために、 GetUdpIPv4Statistics メソッドと GetUdpIPv6Statistics メソッドによって返されます。
このクラスの情報は、 https://www.ietf.org/rfc/rfc2013.txtで説明されている管理情報オブジェクトに関連付けられます。
コンストラクター
| 名前 | 説明 |
|---|---|
| UdpStatistics() |
UdpStatistics クラスの新しいインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| DatagramsReceived |
受信したユーザー データグラム プロトコル (UDP) データグラムの数を取得します。 |
| DatagramsSent |
送信されたユーザー データグラム プロトコル (UDP) データグラムの数を取得します。 |
| IncomingDatagramsDiscarded |
ポート エラーのために受信および破棄されたユーザー データグラム プロトコル (UDP) データグラムの数を取得します。 |
| IncomingDatagramsWithErrors |
不正なポート情報以外のエラーが原因で受信および破棄されたユーザー データグラム プロトコル (UDP) データグラムの数を取得します。 |
| UdpListeners |
ユーザー データグラム プロトコル (UDP) データグラムをリッスンしているローカル エンドポイントの数を取得します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |