Package dev.server

Class DevServer

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.java_websocket.server.WebSocketServer

        org.java_websocket.server.WebSocketServer.WebSocketWorker
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int PORT  
      • Fields inherited from class org.java_websocket.server.WebSocketServer

        decoders
    • Method Summary

      Modifier and Type Method Description
      static java.net.InetAddress getIPAddr()
      Get the public IP-address in the local network
      static void main​(java.lang.String[] args)  
      void onClose​(org.java_websocket.WebSocket conn, int arg1, java.lang.String arg2, boolean arg3)  
      void onError​(org.java_websocket.WebSocket conn, java.lang.Exception e)  
      void onMessage​(org.java_websocket.WebSocket conn, java.lang.String msg)  
      void onOpen​(org.java_websocket.WebSocket conn, org.java_websocket.handshake.ClientHandshake arg1)  
      void onStart()  
      • Methods inherited from class org.java_websocket.server.WebSocketServer

        addConnection, allocateBuffers, broadcast, broadcast, broadcast, broadcast, broadcast, broadcast, createBuffer, getAddress, getConnections, getDraft, getLocalSocketAddress, getPort, getRemoteSocketAddress, getWebSocketFactory, onCloseInitiated, onClosing, onConnect, onMessage, onWebsocketClose, onWebsocketCloseInitiated, onWebsocketClosing, onWebsocketError, onWebsocketMessage, onWebsocketMessage, onWebsocketOpen, onWriteDemand, queue, releaseBuffers, removeConnection, run, setWebSocketFactory, start, stop, stop
      • Methods inherited from class org.java_websocket.AbstractWebSocket

        getConnectionLostTimeout, isReuseAddr, isTcpNoDelay, setConnectionLostTimeout, setReuseAddr, setTcpNoDelay, startConnectionLostTimer, stopConnectionLostTimer
      • Methods inherited from class org.java_websocket.WebSocketAdapter

        onWebsocketHandshakeReceivedAsClient, onWebsocketHandshakeReceivedAsServer, onWebsocketHandshakeSentAsClient, onWebsocketPing, onWebsocketPong
      • Methods inherited from class java.lang.Object

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

      • PORT

        protected static int PORT
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • getIPAddr

        public static java.net.InetAddress getIPAddr()
                                              throws java.net.SocketException
        Get the public IP-address in the local network
        Returns:
        The device's InetAddress in the local network
        Throws:
        java.net.SocketException - Thrown by NetworkInterface.getNetworkInterfaces()
      • onClose

        public void onClose​(org.java_websocket.WebSocket conn,
                            int arg1,
                            java.lang.String arg2,
                            boolean arg3)
        Specified by:
        onClose in class org.java_websocket.server.WebSocketServer
      • onError

        public void onError​(org.java_websocket.WebSocket conn,
                            java.lang.Exception e)
        Specified by:
        onError in class org.java_websocket.server.WebSocketServer
      • onMessage

        public void onMessage​(org.java_websocket.WebSocket conn,
                              java.lang.String msg)
        Specified by:
        onMessage in class org.java_websocket.server.WebSocketServer
      • onOpen

        public void onOpen​(org.java_websocket.WebSocket conn,
                           org.java_websocket.handshake.ClientHandshake arg1)
        Specified by:
        onOpen in class org.java_websocket.server.WebSocketServer
      • onStart

        public void onStart()
        Specified by:
        onStart in class org.java_websocket.server.WebSocketServer