Class WebSocketServer


  • public class WebSocketServer
    extends java.lang.Object
    A HTTP server which serves Web Socket requests at: http://localhost:8080/websocket Open your browser at http://localhost:8080/, then the demo page will be loaded and a Web Socket connection will be made automatically. This server illustrates support for the different web socket specification versions and will work with:
    • Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
    • Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)
    • Chrome 14+ (draft-ietf-hybi-thewebsocketprotocol-10)
    • Chrome 16+ (RFC 6455 aka draft-ietf-hybi-thewebsocketprotocol-17)
    • Firefox 7+ (draft-ietf-hybi-thewebsocketprotocol-10)
    • Firefox 11+ (RFC 6455 aka draft-ietf-hybi-thewebsocketprotocol-17)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int PORT  
      (package private) static boolean SSL  
    • Constructor Summary

      Constructors 
      Constructor Description
      WebSocketServer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

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

      • SSL

        static final boolean SSL
      • PORT

        static final int PORT
    • Constructor Detail

      • WebSocketServer

        public WebSocketServer()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception