NanoHttpd is only one source file: here is the corresponding clip:
public NanoHTTPD(String hostname, int port) {
this.hostname = hostname;
this.myPort = port;
setTempFileManagerFactory(new DefaultTempFileManagerFactory());
setAsyncRunner(new DefaultAsyncRunner());
}
public void start() throws IOException {
myServerSocket = new ServerSocket();
myServerSocket.bind((hostname != null) ? new InetSocketAddress(hostname, myPort) : new InetSocketAddress(myPort));
, , , new NanoHTTPD("localhost",8080) new NanoHTTPD("localhost",8080) - ( )
: , - : ^) - , , : localhost (.. "" , , ,) , , tcp NanoHttpd - , " , - . , - http, , " http://localhost: 8080 " . , , , : - , , - localhost .