NTCPTransport
, TransportImpl
, UDPTransport
public interface Transport
修飾子とタイプ | インタフェース | 説明 |
---|---|---|
static class |
Transport.AddressSource |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
TransportBid |
bid(RouterInfo toAddress,
long dataSize) |
|
int |
countActivePeers() |
|
int |
countActiveSendPeers() |
|
int |
countPeers() |
|
void |
externalAddressReceived(Transport.AddressSource source,
byte[] ip,
int port) |
Notify a transport of an external address change.
|
void |
externalAddressRemoved(Transport.AddressSource source,
boolean ipv6) |
Notify a transport of an external address change.
|
void |
forwardPortStatus(byte[] ip,
int port,
int externalPort,
boolean success,
java.lang.String reason) |
Notify a transport of the results of trying to forward a port.
|
java.util.Vector<java.lang.Long> |
getClockSkews() |
|
java.util.List<RouterAddress> |
getCurrentAddresses() |
What addresses are we currently listening to?
Replaces getCurrentAddress()
|
java.util.Set<Hash> |
getEstablished() |
|
java.util.List<java.lang.String> |
getMostRecentErrorMessages() |
|
CommSystemFacade.Status |
getReachabilityStatus() |
Previously returned short, now enum as of 0.9.20
|
int |
getRequestedPort() |
What INTERNAL port would the transport like to have forwarded by UPnP.
|
java.lang.String |
getStyle() |
The unique identity of this Transport
|
boolean |
hasCurrentAddress() |
Do we have any current address?
|
boolean |
haveCapacity() |
|
boolean |
haveCapacity(int pct) |
|
boolean |
isBacklogged(Hash peer) |
|
boolean |
isEstablished(Hash peer) |
|
boolean |
isUnreachable(Hash peer) |
|
void |
mayDisconnect(Hash peer) |
Tell the transport that we may disconnect from this peer.
|
void |
recheckReachability() |
推奨されていません。
unused
|
void |
renderStatusHTML(java.io.Writer out,
java.lang.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) |
Who to notify on message availability
|
void |
startListening() |
|
void |
stopListening() |
|
java.util.List<RouterAddress> |
updateAddress() |
Ask the transport to update its addresses based on current information and return them
|
boolean |
wasUnreachable(Hash peer) |
Was the peer UNreachable (outbound only) the last time we tried it?
This is NOT reset if the peer contacts us and it is never expired.
|
TransportBid bid(RouterInfo toAddress, long dataSize)
void send(OutNetMessage msg)
void startListening()
void stopListening()
java.util.List<RouterAddress> getCurrentAddresses()
boolean hasCurrentAddress()
java.util.List<RouterAddress> updateAddress()
void externalAddressReceived(Transport.AddressSource source, byte[] ip, int port)
source
- defined in Transport.javaip
- typ. IPv4 or IPv6 non-local; may be null to indicate IPv4 failure or port info onlyport
- 0 for unknown or unchangedvoid externalAddressRemoved(Transport.AddressSource source, boolean ipv6)
source
- defined in Transport.javavoid forwardPortStatus(byte[] ip, int port, int externalPort, boolean success, java.lang.String reason)
ip
- may be nullport
- the internal portexternalPort
- the external port, which for now should always be the same as
the internal port if the forwarding was successful.int getRequestedPort()
void setListener(TransportEventListener listener)
java.lang.String getStyle()
java.util.Set<Hash> getEstablished()
int countPeers()
int countActivePeers()
int countActiveSendPeers()
boolean haveCapacity()
boolean haveCapacity(int pct)
java.util.Vector<java.lang.Long> getClockSkews()
java.util.List<java.lang.String> getMostRecentErrorMessages()
void renderStatusHTML(java.io.Writer out, java.lang.String urlBase, int sortFlags) throws java.io.IOException
java.io.IOException
CommSystemFacade.Status getReachabilityStatus()
@Deprecated void recheckReachability()
boolean isBacklogged(Hash peer)
boolean wasUnreachable(Hash peer)
boolean isUnreachable(Hash peer)
boolean isEstablished(Hash peer)
void mayDisconnect(Hash peer)