0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linux ソケットの生成から終了までのプロセスを図にしてみた

Last updated at Posted at 2024-10-13

socket を のび太の引き出しくらいにしか理解してなかったので教科書と chatGPT の力を借りて図にしてみた。

今日の学び
クライアントから見ると、同じソケットにずっと話しかけているのに実は青から緑へと、違うソケットに話しかけることになっている。

間違ってるところはぜひコメントください。

image.png

青も緑も同じlocal ip address/portを共有している。しかしremote側のip address/portが違うので違うものとして識別できる

オレンジのip address/portはremote側のものなんだけど、それがsocketに紐づいていることを表現したくて緑のソケットにくっつけている。うまい表現が思いつかなかった

TCPのFIN/ACKあたりは諸説あるので適当

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?