Skip to content

Latest commit

 

History

History
80 lines (57 loc) · 3.29 KB

README.md

File metadata and controls

80 lines (57 loc) · 3.29 KB

COMP3331_9331_21T3

For T18A and W17A students

Useful links:


Tut02 / Finalexam


Assignment demo structure

  • based on the demo code
  • server will have a main thread to handle incomming connection from client
  • Once a client connected to the server, server will create a subthread/subprocess to handle the TCP connection.
  • The Client will also have 3 different thread/process:
    • main process - sending message: this process will handle all the user input, and send it to the server/another client.
    • subprocess 1 - receiving message: this process will handle all the incoming messages (basically print them)
    • subprocess 2 - listening: this process is for P2P connection, it is highly similar to the main thread of server.py. Once a client is connected to it, it will create a subthread/subprocess to handle the TCP connection.
  • More detail about P2P - How doessubprocess 2 - listening work?
    • it will find an available port and listen to it.
    • it will upload the IPAddress/port to the server: to allow other clients to get its address and connect to it.
    • it will start to listen (in a while loop), once another client is connected to it, it will create a subthread/subprocess to handle the TCP connection. image

Lab1:


Lab2


Lab3


Tut01 / Midterm


Lab4


Lab5


Lab6