Package server

Source Code of server.Server

package server;

import common.ListeningThread;

public class Server {
  private static Server instance;
 
  public static Server getInstance() {
   
    if (instance == null)
      instance = new Server();
     
    return instance;
 
 
  public int start(int port) {
    SRH srh = new SRH(port);
    ListeningThread thread = new ListeningThread(srh);
    thread.start();
    return srh.getPort();
  }
 
}
TOP

Related Classes of server.Server

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.