250x250
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- OpenCV
- POD
- Docker
- 파이썬
- Computer Vision
- MariaDB
- vue.js
- numpy
- paper review
- GUI
- 웹 프로그래밍
- kubernetes
- Python
- Tkinter
- 논문 리뷰
- 딥러닝
- 데이터베이스
- 그래픽 유저 인터페이스
- Web Programming
- 컴퓨터 비전
- 장고
- FLASK
- pytorch
- 텐서플로우
- Django
- Deep Learning
- tensorflow
- 파이토치
- yaml
- k8s
Archives
- Today
- Total
목록thread (1)
Maxima's Lab
[Python, TCP/IP] 다중 클라이언트 (Multiple Clients) 데이터 송수신
안녕하세요, 오늘은 다중 클라이언트 (Multiple Clients)에 대해서 접속을 수락하고 각 Clients가 보내는 데이터를 송수신하는 코드를 구현해보도록 하겠습니다. 이를 구현하기 위해서는 Multiple Threads를 사용해서 클라이언트의 연결 요청을 처리하고 연결할 수 있는 최대 클라이언트 수를 지정해줍니다. import socket import threading HOST = '127.0.0.1' PORT = 12345 MAX_CLIENTS = 5 def handle_client(conn, addr): print(f'Connected by {addr}') while True: data = conn.recv(1024) if not data: break print(f'Received {repr(..
Python/TCP IP
2023. 3. 1. 16:43