TcpConnectionInformation クラス
アセンブリ: System (system.dll 内)



アクティブな TCP 接続のエンドポイント情報を表示するコード例を次に示します。
Public Shared Sub GetTcpConnections() Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties() Dim connections As TcpConnectionInformation() = properties.GetActiveTcpConnections() Dim t As TcpConnectionInformation For Each t In connections Console.Write("Local endpoint: {0} ", t.LocalEndPoint.Address) Console.Write("Remote endpoint: {0} ", t.RemoteEndPoint.Address) Console.WriteLine("{0}", t.State) Next t End Sub 'GetTcpConnections
public static void GetTcpConnections() { IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties(); TcpConnectionInformation[] connections = properties.GetActiveTcpConnections(); foreach (TcpConnectionInformation t in connections) { Console.Write("Local endpoint: {0} ",t.LocalEndPoint.Address); Console.Write("Remote endpoint: {0} ",t.RemoteEndPoint.Address); Console.WriteLine("{0}",t.State); } }

System.Net.NetworkInformation.TcpConnectionInformation


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TcpConnectionInformation コンストラクタ
アセンブリ: System (system.dll 内)



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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


TcpConnectionInformation プロパティ

名前 | 説明 | |
---|---|---|
![]() | LocalEndPoint | 伝送制御プロトコル (TCP) 接続のローカル エンドポイントを取得します。 |
![]() | RemoteEndPoint | 伝送制御プロトコル (TCP) 接続のリモート エンドポイントを取得します。 |
![]() | State | この伝送制御プロトコル (TCP) 接続の状態を取得します。 |

TcpConnectionInformation メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

TcpConnectionInformation メンバ
ローカル コンピュータ上の伝送制御プロトコル (TCP) 接続に関する情報を提供します。
TcpConnectionInformation データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | LocalEndPoint | 伝送制御プロトコル (TCP) 接続のローカル エンドポイントを取得します。 |
![]() | RemoteEndPoint | 伝送制御プロトコル (TCP) 接続のリモート エンドポイントを取得します。 |
![]() | State | この伝送制御プロトコル (TCP) 接続の状態を取得します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- TcpConnectionInformationのページへのリンク