LoginSignup
0
1

More than 3 years have passed since last update.

Pythonでネットワークプログラム 

Last updated at Posted at 2020-05-15

TCP通信
サーバ側
サーバ側のプログラムは基本的に以下の流れで構築する

socketでソケットを作成 TCP通信を用いる場合は、引数にAF_INET, SOCK_STREAMを指定する
bindでアドレスとポート番号を指定
listenでクライアントの接続を待つ
acceptでクライアントの接続を受け付ける
sendやrecvを使ってクライアントのデータの送受信を行う
closeでソケットを閉じる
の流れで行う

0
1
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
1