|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PEPeerTransport
Field Summary | |
---|---|
static int |
CONNECTION_CONNECTING
|
static int |
CONNECTION_FULLY_ESTABLISHED
|
static int |
CONNECTION_PENDING
|
static int |
CONNECTION_WAITING_FOR_HANDSHAKE
|
Fields inherited from interface org.gudy.azureus2.core3.peer.PEPeer |
---|
CLOSING, CONNECTING, DISCONNECTED, HANDSHAKING, MESSAGING_AZMP, MESSAGING_BT_ONLY, MESSAGING_EXTERN, MESSAGING_LTEP, StateNames, TRANSFERING |
Fields inherited from interface com.aelitis.azureus.core.tag.Taggable |
---|
TT_DOWNLOAD, TT_PEER |
Method Summary | |
---|---|
void |
checkInterested()
if it doesn't go as expected when trying to find a piece to ask a peer for, need to double check if we're still interested in them, and get the BT protocol sycnhed |
void |
closeConnection(java.lang.String reason)
Close the peer connection |
void |
doKeepAliveCheck()
Check if we need to send a keep-alive message. |
void |
doPerformanceTuningCheck()
Perform checks related to performance optimizations, i.e. |
boolean |
doTimeoutChecks()
Check for possible connection timeouts. |
void |
generateEvidence(IndentWriter writer)
|
int |
getConnectionState()
Get the specific peer connection state. |
PEPeerControl |
getControl()
|
java.util.List |
getExpiredRequests()
|
long |
getLastMessageSentTime()
|
long |
getLatency()
|
int |
getMaxNbRequests()
peer-specific request max. |
int |
getNbRequests()
|
java.lang.String |
getNetwork()
|
PeerItem |
getPeerItemIdentity()
Get the peer's address + port identification item. |
int[] |
getPriorityOffsets()
Any priority offsets this peer has, or null if none |
int |
getRequestIndex(DiskManagerReadRequest request)
Returns the index of this request in the peer's queue or -1 if not found |
long |
getTimeSinceGoodDataReceived()
Get the time since the most-recent data that was actually written to disk was received. |
long |
getTimeSinceLastDataMessageReceived()
Get the time since the last (most-recent) data (payload) message was received. |
long |
getTimeSinceLastDataMessageSent()
Get the time since the last (most-recent) data (payload) message was sent. |
long |
getUnchokedForMillis()
|
boolean |
isLANLocal()
Is the connection within the local LAN network. |
boolean |
isSafeForReconnect()
This method is called to check if it is safe to reconnect to a peer, i.e. |
boolean |
isStalledPendingLoad()
is peer waiting for a disk read with no network writes queued |
boolean |
isTCP()
|
PEPeerTransport |
reconnect(boolean tryUDP,
boolean tryIPv6)
Attempts to reconnect to the same peer |
DiskManagerReadRequest |
request(int pieceNumber,
int pieceOffset,
int pieceLength,
boolean return_duplicates)
|
void |
requestAllocationComplete()
|
boolean |
requestAllocationStarts(int[] base_priorities)
Two methods that allow a peer to aggregate the individual requests generated during an allocation cycle if so desired |
void |
sendBadPiece(int piece_number)
|
void |
sendCancel(DiskManagerReadRequest request)
|
void |
sendChoke()
|
void |
sendHave(int piece)
|
void |
sendStatsReply(java.util.Map reply)
|
void |
sendStatsRequest(java.util.Map request)
|
void |
sendUnChoke()
|
void |
start()
Start message processing for the peer |
boolean |
transferAvailable()
|
void |
updatePeerExchange()
Do any peer exchange processing/updating. |
Methods inherited from interface com.aelitis.azureus.core.tag.Taggable |
---|
getTaggableID, getTaggableResolver, getTaggableTransientProperty, getTaggableType, setTaggableTransientProperty |
Field Detail |
---|
static final int CONNECTION_PENDING
static final int CONNECTION_CONNECTING
static final int CONNECTION_WAITING_FOR_HANDSHAKE
static final int CONNECTION_FULLY_ESTABLISHED
Method Detail |
---|
void start()
void sendChoke()
sendChoke
in interface PEPeer
void sendUnChoke()
sendUnChoke
in interface PEPeer
void sendHave(int piece)
void sendCancel(DiskManagerReadRequest request)
void sendBadPiece(int piece_number)
void sendStatsRequest(java.util.Map request)
sendStatsRequest
in interface PEPeer
void sendStatsReply(java.util.Map reply)
boolean requestAllocationStarts(int[] base_priorities)
void requestAllocationComplete()
DiskManagerReadRequest request(int pieceNumber, int pieceOffset, int pieceLength, boolean return_duplicates)
pieceNumber
- pieceOffset
- pieceLength
- return_duplicates
- - if true and request already exists it will be returned, if false -> null
int getRequestIndex(DiskManagerReadRequest request)
void closeConnection(java.lang.String reason)
reason
- for closureboolean transferAvailable()
transferAvailable
in interface PEPeer
long getLastMessageSentTime()
java.util.List getExpiredRequests()
int getMaxNbRequests()
int getNbRequests()
PEPeerControl getControl()
int[] getPriorityOffsets()
void doKeepAliveCheck()
boolean doTimeoutChecks()
void doPerformanceTuningCheck()
int getConnectionState()
long getTimeSinceLastDataMessageReceived()
long getTimeSinceGoodDataReceived()
long getTimeSinceLastDataMessageSent()
long getUnchokedForMillis()
long getLatency()
void updatePeerExchange()
PeerItem getPeerItemIdentity()
boolean isStalledPendingLoad()
boolean isLANLocal()
isLANLocal
in interface PEPeer
boolean isTCP()
void checkInterested()
PEPeerTransport reconnect(boolean tryUDP, boolean tryIPv6)
tryUDP
- try to initate a UDP connection if true, just reestablish the previous state otherwisetryIPv6
- TODO
boolean isSafeForReconnect()
java.lang.String getNetwork()
void generateEvidence(IndentWriter writer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |