• kth.se
  • Student web
  • Intranet
  • kth.se
  • Student web
  • Intranet
Login
ID1212 HT20 (50606)
Task 1, Sockets
Skip To Content
Dashboard
  • Login
  • Dashboard
  • Calendar
  • Inbox
  • History
  • Help
Close
  • Min översikt
  • ID1212 HT20 (50606)
  • Assignments
  • Task 1, Sockets
  • Home
  • Modules
  • Pages
  • Assignments
  • Syllabus
  • Files
  • Media Gallery
  • Course Evaluation

Task 1, Sockets

  • Due No Due Date
  • Points 1
  • Submitting a file upload
  • File Types txt, java, and pdf

Chat application using sockets

Your task is to write a simple chat program consisting of a server and a client where the server forwards incoming messages from a client to all other clients. Specifically regarding threads, they should be as follows:

  • ChatClient.java: Has two threads, one to listen for incoming messages from the server and one to send messages to the server.
  • ChatServer.java: Has one thread to each of the clients currently connected but also one thread to listen for new incoming connections from new clients.

There is no requirement to handle user login or chatrooms. Plain and simple.

Extra assignment: Find and download a (simple) network sniffer (suggestion Wireshark Links to an external site.), record some traffic from your chat and explain the TCP headers and flags (ACK/SYN/PSH/FIN). Compare with TCP-datagrams from your web browser.

Useful classes:
java.net.Socket Links to an external site.
java.net.ServerSocket Links to an external site.

Note:

  • If you work in pairs, only one of you should upload the code, otherwise there will be a plagiarism match.
  • Upload the code before (or during) presentation.
0
Please include a description
Additional Comments:
Rating max score to > pts
Please include a rating title

Rubric

Find Rubric
Please include a title
Find a Rubric
Title
You've already rated students with this rubric. Any major changes could affect their assessment results.
 
 
 
 
 
 
 
     
Can't change a rubric once you've started using it.  
Title
Criteria Ratings Pts
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
Total Points: 5 out of 5