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.
ソケット ファイル記述子を (接続またはバインドによって) 接続している場合、 と入力SOCK_STREAMすると、リモート アドレス/IP アドレスを取得できますか?
SOCK_STREAM
ソケットファイル記述子以外のデータがない関数内でこれを行う必要があります。
getpeername
getpeername()システムコールを参照してください。
getpeername()