## net.i2p.router.transport
Interface Transport

All Known Implementing Classes:
  NTCPTransport, TransportImpl, UDPTransport

    public interface Transport

Defines a way to send a message to another peer and start listening for messages

Field Summary
`static String` `SOURCE_CONFIG`
`static String` `SOURCE_INTERFACE`
`static String` `SOURCE_UPNP`

Method Summary
`TransportBid` `bid(RouterInfo toAddress, long dataSize)`
`int` `countActivePeers()`
`int` `countActiveSendPeers()`
`int` `countPeers()`
`void` `externalAddressReceived(String source, byte[] ip, int port)`
`void` `forwardPortStatus(int port, boolean success, String reason)`
`Vector` `getClockSkews()`
`RouterAddress` `getCurrentAddress()`
`List` `getMostRecentErrorMessages()`
`short` `getReachabilityStatus()`
`int` `getRequestedPort()`
`String` `getStyle()`
`boolean` `haveCapacity()`
`boolean` `haveCapacity(int pct)`
`boolean` `isBacklogged(Hash dest)`
`boolean` `isEstablished(Hash peer)`
`boolean` `isUnreachable(Hash peer)`
`void` `recheckReachability()`
`void` `renderStatusHTML(Writer out, String urlBase, int sortFlags)`
`void` `send(OutNetMessage msg)` Asynchronously send the message as requested in the message and, if the send is successful, queue up any msg.getOnSendJob job, and register it with the OutboundMessageRegistry (if it has a reply selector).
`void` `setListener(TransportEventListener listener)`
`RouterAddress` `startListening()`
`void` `stopListening()`
`RouterAddress` `updateAddress()`
`boolean` `wasUnreachable(Hash dest)`

Field Detail

### SOURCE_UPNP

    static final String SOURCE_UPNP

See Also:
  Constant Field Values

### SOURCE_INTERFACE

    static final String SOURCE_INTERFACE

See Also:
  Constant Field Values

### SOURCE_CONFIG

    static final String SOURCE_CONFIG

See Also:
  Constant Field Values

Method Detail

### bid

    TransportBid bid(RouterInfo toAddress,
                     long dataSize)

### send

    void send(OutNetMessage msg)

  Asynchronously send the message as requested in the message and, if the send is successful, queue up any msg.getOnSendJob job, and register it with the OutboundMessageRegistry (if it has a reply selector). If the send fails, queue up any msg.getOnFailedSendJob

### startListening

    RouterAddress startListening()

### stopListening

    void stopListening()

### getCurrentAddress

    RouterAddress getCurrentAddress()

### updateAddress

    RouterAddress updateAddress()

### externalAddressReceived

    void externalAddressReceived(String source,
                                 byte[] ip,
                                 int port)

### forwardPortStatus

    void forwardPortStatus(int port,
                           boolean success,
                           String reason)

### getRequestedPort

    int getRequestedPort()

### setListener

    void setListener(TransportEventListener listener)

### getStyle

    String getStyle()

### countPeers

    int countPeers()

### countActivePeers

    int countActivePeers()

### countActiveSendPeers

    int countActiveSendPeers()

### haveCapacity

    boolean haveCapacity()

### haveCapacity

    boolean haveCapacity(int pct)

### getClockSkews

    Vector getClockSkews()

### getMostRecentErrorMessages

    List getMostRecentErrorMessages()

### renderStatusHTML

    void renderStatusHTML(Writer out,
                          String urlBase,
                          int sortFlags)
                          throws IOException

  Throws:
    `IOException`

### getReachabilityStatus

    short getReachabilityStatus()

### recheckReachability

    void recheckReachability()

### isBacklogged

    boolean isBacklogged(Hash dest)

### wasUnreachable

    boolean wasUnreachable(Hash dest)

### isUnreachable

    boolean isUnreachable(Hash peer)

### isEstablished

    boolean isEstablished(Hash peer)