Class Server


  • public class Server
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.net.DatagramSocket dgsocket
      UDP socket
      protected java.util.Map<java.lang.String,​IRegisteredHost> registeredhosts  
      protected boolean running  
      protected java.net.ServerSocket serversocket
      Server socket for command line access
      static java.nio.charset.Charset UTF8  
      protected java.net.ServerSocket webserversocket
      Server socket for web access
    • Constructor Summary

      Constructors 
      Constructor Description
      Server​(java.lang.String host, int port, int wport, int uport)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      static java.lang.String readLine​(java.io.InputStream in)
      Read a line from an input stream.
      void start()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UTF8

        public static java.nio.charset.Charset UTF8
      • serversocket

        protected java.net.ServerSocket serversocket
        Server socket for command line access
      • webserversocket

        protected java.net.ServerSocket webserversocket
        Server socket for web access
      • dgsocket

        protected java.net.DatagramSocket dgsocket
        UDP socket
      • registeredhosts

        protected java.util.Map<java.lang.String,​IRegisteredHost> registeredhosts
      • running

        protected boolean running
    • Constructor Detail

      • Server

        public Server​(java.lang.String host,
                      int port,
                      int wport,
                      int uport)
    • Method Detail

      • start

        public void start()
      • main

        public static void main​(java.lang.String[] args)
      • readLine

        public static java.lang.String readLine​(java.io.InputStream in)
                                         throws java.lang.Exception
        Read a line from an input stream.
        Throws:
        java.lang.Exception