A Networked Chat: Python Advanced #6.5
A Networked Chat: Python Advanced #6.5
Preamble
This is an extension of the
Networking Tutorial.
I cover the how to set up TCP and
UDP connections there.
How it works!
We will be creating a basic client/server
anonymous command-line chat program.
The clients will send messages to the server
with their desired username attached.
The server will broadcast all the messages it
receives to all the clients who have spoken
too it.
Server Program
The server will keep a list of client
IPs and ports.
When a message is received it is sent
too all existing clients.
A log of time and message is printed
to screen.
Client Program
The client will ask the user for a
username.
A separate thread will handle incoming
messages
Because event driven command line
tricks are different for each OS, I went
with a press enter to refresh.
Thanks!
I hope this gave a more hands look
at networking.
Thanks for Watching!