/python_socket_programming

Computer Network Project

Primary LanguagePythonMIT LicenseMIT

Python Socket Programming

Computer Network Project

Simple Version

This is the first version of socket programming with no login authentication.

Just test its functions.

TCP Version

Complete functions below:

  1. check online numbers

  2. check all the message

  3. broadcast online client

  4. broadcast any message input

  5. forward message

  6. exit

Preparation:

required modules:
    socket
    threading

How to run the code:

python server_tcp_login.py

split the terminal, then

python client_tcp_login.py

Have fun with all the functions realized!

PS: login information are in the users.txt.

UDP Version

Complete functions below:

  1. check online numbers

  2. send message to the server

  3. send message to the online client

  4. receive message

  5. exit

Preparation:

required modules:
    socket
    time

How to run the code:

python server_udp.py

split the terminal, then

python client_udp.py

Have fun with all the functions realized!

PS: login information are in the word.txt.