If it is not explicitly told in following recipe, setting up services are described for Ubuntu 16.04 server, but applications are described for Ubuntu 16.04 and/or Lubuntu 16.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.

12. Networking

  1. Review presentation Networking

      

  2. Investigate jtm.activity12 package
  3. Run TttCli class in terminal, to see, how it works in terminal using standard input and output:

    java -cp target/classes/ jtm.activity12.TttCli

    and enter numbers of the cells.

  4. Implement TttNet class to run it either as a server (if port is available), or client (if server is listening to the port)
  5. When running as server is implemented:
    1. Run TttNet in one terminal:

      java -cp target/classes/ jtm.activity12.TttNet
    2. Check if server is listening, by runinng command in other terminal:

      ss -ntlp|grep 9999
    3. Check, how server part works with telnet program as a client in other terminal:

      telnet 127.0.1.1 9999

      and it should run in the same way as TttCli, with only difference,
      that data are sent through the network socket.

  6. When client part is implemented for TttNet class, it in another terminal:

    java -cp target/classes/ jtm.activity12.TttNet

    it should work in the same way as TttCli, with only difference,
    that data are sent through the network socket.

  7. If necessary, application can be killed with command:

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

Extra exercises

  1. Investigate packages jtm.extra13 and jtm.extra14.
  2. Implement ChatServer and ChatClient classes to pass unit tests

Additional info (in Latvian)


  
Tags:
Created by Valdis Vītoliņš on 2020-05-28 13:56
Last modified by Valdis Vītoliņš on 2020-05-28 15:27
 
Xwiki Powered
Creative Commons Attribution 3.0 Unported License