Class Connection

    • Constructor Detail

      • Connection

        public Connection()
    • Method Detail

      • connect

        public abstract void connect​(java.net.InetSocketAddress endPoint,
                                     int timeout)
        Connects to the specified end point.
        Parameters:
        endPoint - The end point to connect to.
        timeout - Timeout in milliseconds
      • connect

        public final void connect​(java.net.InetSocketAddress endPoint)
        Connects to the specified end point.
        Parameters:
        endPoint - The end point to connect to.
      • disconnect

        public abstract void disconnect()
        Disconnects this instance.
      • send

        public abstract void send​(byte[] data)
        Sends the specified data packet.
        Parameters:
        data - The data packet to send.
      • getLocalIP

        public abstract java.net.InetAddress getLocalIP()
        Gets the local IP.
        Returns:
        The local IP.
      • getCurrentEndPoint

        public abstract java.net.InetSocketAddress getCurrentEndPoint()
      • getProtocolTypes

        public abstract ProtocolTypes getProtocolTypes()
        Returns:
        The type of communication protocol that this connection uses.