Back to project page android_opengles.
The source code is released under:
MIT License
If you think the Android project android_opengles listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fi.iki.elonen.samples.echo; /*from w w w . jav a 2 s. c om*/ import fi.iki.elonen.NanoWebSocketServer; import java.io.IOException; public class EchoSocketSample { public static void main(String[] args) throws IOException { final boolean debugMode = args.length >= 2 && args[1].toLowerCase().equals("-d"); NanoWebSocketServer ws = new DebugWebSocketServer(Integer.parseInt(args[0]), debugMode); ws.start(); System.out.println("Server started, hit Enter to stop.\n"); try { System.in.read(); } catch (IOException ignored) { } ws.stop(); System.out.println("Server stopped.\n"); } }