| Modifier and Type | Field and Description |
|---|---|
(package private) long |
lastSent |
| Constructor and Description |
|---|
PeerConnectionOut(Peer peer,
DataOutputStream dout) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
cancelRequest(int piece,
int begin,
int length)
Called by the PeerState when the other side doesn't want this request to be handled anymore.
|
(package private) void |
cancelRequestMessages()
Remove all Request messages from the queue.
|
void |
disconnect() |
(package private) int |
queuedBytes() |
(package private) void |
retransmitRequests(List<Request> requests) |
void |
run()
Continuesly monitors for more outgoing messages that have to be send.
|
(package private) void |
sendAlive() |
(package private) void |
sendBitfield(BitField bitfield) |
(package private) void |
sendCancel(Request req)
send cancel
|
(package private) void |
sendChoke(boolean choke) |
(package private) void |
sendExtension(int id,
byte[] bytes) |
(package private) void |
sendHave(int piece) |
(package private) void |
sendInterest(boolean interest) |
(package private) void |
sendPiece(int piece,
int begin,
int length,
DataLoader loader)
Queue a piece message with a callback to load the data from disk when required.
|
(package private) void |
sendPort(int port) |
(package private) void |
sendReject(int piece,
int begin,
int length) |
(package private) void |
sendRequest(Request req) |
(package private) void |
sendRequests(List<Request> requests) |
void |
startup() |
public PeerConnectionOut(Peer peer, DataOutputStream dout)
void cancelRequest(int piece,
int begin,
int length)
void cancelRequestMessages()
public void disconnect()
int queuedBytes()
public void run()
void sendAlive()
void sendBitfield(BitField bitfield)
void sendCancel(Request req)
void sendChoke(boolean choke)
void sendExtension(int id,
byte[] bytes)
void sendHave(int piece)
void sendInterest(boolean interest)
void sendPiece(int piece,
int begin,
int length,
DataLoader loader)
void sendPort(int port)
void sendReject(int piece,
int begin,
int length)
void sendRequest(Request req)
public void startup()