Package fi.iki.elonen

Class NanoWSD.WebSocket

    • Method Detail

      • isOpen

        public boolean isOpen()
      • onOpen

        protected abstract void onOpen()
      • onException

        protected abstract void onException​(java.io.IOException exception)
      • debugFrameReceived

        protected void debugFrameReceived​(NanoWSD.WebSocketFrame frame)
        Debug method. Do not Override unless for debug purposes!
        Parameters:
        frame - The received WebSocket Frame.
      • debugFrameSent

        protected void debugFrameSent​(NanoWSD.WebSocketFrame frame)
        Debug method. Do not Override unless for debug purposes!
        This method is called before actually sending the frame.
        Parameters:
        frame - The sent WebSocket Frame.
      • close

        public void close​(NanoWSD.WebSocketFrame.CloseCode code,
                          java.lang.String reason,
                          boolean initiatedByRemote)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • handleCloseFrame

        private void handleCloseFrame​(NanoWSD.WebSocketFrame frame)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • handleFrameFragment

        private void handleFrameFragment​(NanoWSD.WebSocketFrame frame)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • handleWebsocketFrame

        private void handleWebsocketFrame​(NanoWSD.WebSocketFrame frame)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • ping

        public void ping​(byte[] payload)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • readWebsocket

        private void readWebsocket()
      • send

        public void send​(byte[] payload)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • send

        public void send​(java.lang.String payload)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • sendFrame

        public void sendFrame​(NanoWSD.WebSocketFrame frame)
                       throws java.io.IOException
        Throws:
        java.io.IOException