Search code examples
eclipsesocketssocket.ioudpdatagram

Java: Writing a Datagram Client and Server from Eclipse


I am Writing a Datagram Client and Server using eclipse with the class DatagramSocket. My question is: first I run the server from Eclipse, but when I run the client the server will continue work or just terminate ?


Solution

  • I wrote a server discovery system while attending computer networks course at my university, have a look:

    https://github.com/colonder/Rudolph-server-discovery-system

    It was a bit ago but as far as I remember both server and client are separate threads so one shouldn't kill the other, but I'm not so sure about running both things in the same Eclipse instance. When I was coding it at home I had only one machine available, so I guess it's possible to run both of them in the same Eclipse instance.