0% found this document useful (0 votes)
32 views6 pages

A Networked Chat: Python Advanced #6.5

This document describes how to create a basic client/server anonymous command-line chat program using Python. The server will broadcast messages received from clients to all connected clients, keeping track of IP addresses and ports. The client program will prompt for a username and use a separate thread to handle incoming messages, with the user pressing enter to refresh messages. The goal is to provide a more hands-on look at networking concepts like TCP and UDP connections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views6 pages

A Networked Chat: Python Advanced #6.5

This document describes how to create a basic client/server anonymous command-line chat program using Python. The server will broadcast messages received from clients to all connected clients, keeping track of IP addresses and ports. The client program will prompt for a username and use a separate thread to handle incoming messages, with the user pressing enter to refresh messages. The goal is to provide a more hands-on look at networking concepts like TCP and UDP connections.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

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!

You might also like