Class TcpServer.Acceptor

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

    protected class TcpServer.Acceptor
    extends java.lang.Object
    implements java.lang.Runnable
    • 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()
      Acceptor thread.
      • 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()
        Acceptor thread. Continuously accept new connections. Create a new thread for each new connection and put it in conns. When the thread should stop, it is interrupted by the thread creator.
        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