Class WebSocketConnection


  • public class WebSocketConnection
    extends Connection
    • Constructor Detail

      • WebSocketConnection

        public WebSocketConnection()
    • Method Detail

      • connect

        public void connect​(java.net.InetSocketAddress endPoint,
                            int timeout)
        Description copied from class: Connection
        Connects to the specified end point.
        Specified by:
        connect in class Connection
        Parameters:
        endPoint - The end point to connect to.
        timeout - Timeout in milliseconds
      • disconnect

        public void disconnect()
        Description copied from class: Connection
        Disconnects this instance.
        Specified by:
        disconnect in class Connection
      • send

        public void send​(byte[] data)
        Description copied from class: Connection
        Sends the specified data packet.
        Specified by:
        send in class Connection
        Parameters:
        data - The data packet to send.
      • getLocalIP

        public java.net.InetAddress getLocalIP()
        Description copied from class: Connection
        Gets the local IP.
        Specified by:
        getLocalIP in class Connection
        Returns:
        The local IP.
      • onData

        public void onData​(byte[] data)
      • onClose

        public void onClose​(boolean remote)
      • onError

        public void onError​(java.lang.Exception ex)
      • onOpen

        public void onOpen()