Note, that this recipe is not updated long time and could be outdated!
Got it.

Extra 13. Multithreaded networking

Tasks

Review theory

  1. Review presentations:

    1. Threads
    2. Chat

Implement chat server

  1. Investigate jtm.extra13 package
  2. If necessary, change value of static final int port = 7700 variable in ChatServer.java class and value of port key in src/resources/appplication.properties configuration file to different number e.g. 7701
  3. Implement class ChatServer to pass unit tests
  4. Server could be checked using nc program, e.g. following:

    nc 127.0.1.1 7700
  5. To check if server is listening on necessary port, run command:

    netstat -antp|grep 7700
  6. If necessary, server can be killed with command:

    kill -9 pid
    wher pid is process id from the previous command

Implement chat client

  1. Investigate package jtm.extra14
  2. If necessary, change value of static final int port = 7700 variable in ChatClient.java class and value of port key in src/resources/appplication.properties configuration file to different number e.g. 7701
  3. Implement ChatClient class to pass unit tests

  

Created by Valdis Vītoliņš on 2020-05-26 10:38
Last modified by Valdis Vītoliņš on 2021-08-05 12:14
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License