Class UDPServer

java.lang.Object
com.ensea_chatapp_udp.Server.UDPServer

public class UDPServer extends Object
This is a class to implement a UDP Server which receives data and print it in console

The class takes an optional command line arguments: Server port In the case that port is absent, 8439 is the default port.

Usage: java com.ensea_chatapp_udp.Server.UDPServer

Usage: java com.ensea_chatapp_udp.Server.UDPServer server_port

  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException
    • launch

      public void launch() throws IOException
      launch the server in order to receive data from clients and print it in console
      Throws:
      IOException
    • toString

      public String toString()
      Returns state of the Server
      Overrides:
      toString in class Object
      Returns:
      State of server in String