All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bt.net.Peer Maven / Gradle / Ivy

There is a newer version: 1.10
Show newest version
package bt.net;

import bt.peer.PeerOptions;

import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.Optional;

/**
 * Represents a peer, accessible on the Internet.
 *
 * @since 1.0
 */
public interface Peer {

    /**
     * @since 1.2
     */
    InetSocketAddress getInetSocketAddress();

    /**
     * @return Peer Internet address.
     * @since 1.0
     */
    InetAddress getInetAddress();

    /**
     * @return Peer port.
     * @since 1.0
     */
    int getPort();

    /**
     * @return Optional peer ID
     * @since 1.0
     */
    Optional getPeerId();

    /**
     * @return Peer options and preferences
     * @since 1.2
     */
    PeerOptions getOptions();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy