Warning

If it is not explicitly told in following recipe, setting up services are described for Ubuntu 24.04 server, but applications are described for Xubuntu 24.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.

Chat server

Prev
JPA
Next
Chat client

Main steps

Review theory

  1. If necessary, review presentations:

    1. Threads
    2. Chat

Implement chat server

  1. Investigate jtm.extra07 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

Prev
JPA
Next
Chat client

 
 

Created by Valdis Vītoliņš on 2026-03-19 12:38
Last modified by Valdis Vītoliņš on 2026-03-19 13:55
XWiki Powered
Creative Commons Attribution 3.0 Unported License