TcpConnectionInformationとは? わかりやすく解説

TcpConnectionInformation クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

ローカル コンピュータ上の伝送制御プロトコル (TCP) 接続に関する情報を提供します。

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

Public MustInherit Class
 TcpConnectionInformation
Dim instance As TcpConnectionInformation
public abstract class TcpConnectionInformation
public ref class TcpConnectionInformation abstract
public abstract class TcpConnectionInformation
public abstract class TcpConnectionInformation
解説解説
使用例使用例

アクティブな 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.Object
  System.Net.NetworkInformation.TcpConnectionInformation
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TcpConnectionInformation メンバ
System.Net.NetworkInformation 名前空間

TcpConnectionInformation コンストラクタ


TcpConnectionInformation プロパティ


TcpConnectionInformation メソッド


TcpConnectionInformation メンバ

ローカル コンピュータ上の伝送制御プロトコル (TCP) 接続に関する情報を提供します。

TcpConnectionInformation データ型で公開されるメンバを以下の表に示します。


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド TcpConnectionInformation TcpConnectionInformation クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

TcpConnectionInformation クラス
System.Net.NetworkInformation 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「TcpConnectionInformation」の関連用語

TcpConnectionInformationのお隣キーワード
検索ランキング

   

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



TcpConnectionInformationのページの著作権

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

©2026 GRAS Group, Inc.RSS