This example demonstrates basic TCP socket programming in Python. It sets up a simple chat server that accepts multiple client connections, broadcasts messages from one client to all others, and handles client disconnections.
python
- Run the server script:
python chat_app.py - In separate terminals, run multiple client instances (you'll need a client script, or use netcat:
nc 127.0.0.1 65432).
This example accompanies the Turkish article: Python ile Ağ İletişiminin Temelleri: Soket Programlamaya Giriş.
MIT — see LICENSE.