Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
TcpClientクラスを使用してサーバーへのtcp接続を確立する場合、この接続の送信元ポートを見つける方法はありますか?execプロトコルを実装しようとしていますが、stderrポートは常に送信元ポート+1のようです。
((IPEndPoint) tcpClient.Client.LocalEndPoint).Port接続を確立した後に使用します。
((IPEndPoint) tcpClient.Client.LocalEndPoint).Port
解決しました:)
クライアントは、stderrポートのTCPポート番号(10進数のASCII、ヌル終了)を送信します。最初のバイトがNULLの場合、サーバーはstderr接続を確立しません。