If it is not explicitly told in following recipe, setting up services are described for Ubuntu 20.04 server, but applications are described for Xubuntu 20.04 workstation. If you use different Ubuntu version or Linux distribution, settings as well as content, names and places of configuration files may be different!
Got it.

Extra 13. Multithreaded networking

Main steps

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
    where 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 2024-08-27 17:33
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License