Class TcpServer.Acceptor

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    TcpServer

    protected class TcpServer.Acceptor
    extends java.lang.Object
    implements java.lang.Runnable
    Acceptor thread. Continuously accepts new connections, creating a new thread for each new connection and putting it in conns. When the thread should stop, it is interrupted by the thread creator
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Acceptor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void handleAccept​(java.net.Socket client_sock)  
      void run()  
      • Methods inherited from class java.lang.Object

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

      • Acceptor

        protected Acceptor()
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • handleAccept

        protected void handleAccept​(java.net.Socket client_sock)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception