| Class | RubyTorrent::PeerConnection |
| In: |
lib/rubytorrent/peer.rb
|
| Parent: | Object |
The PeerConnection object deals with all the protocol issues. It keeps state information as to the connection and the peer. It is tightly integrated with the Controller object.
Remember to be "strict in what you send, lenient in what you accept".
| BUFSIZE | = | 8192 |
| MAX_PEER_REQUESTS | = | 5 |
| MAX_REQUESTS | = | 5 |
| MIN_REQUESTS | = | 1 |
| REQUEST_TIMEOUT | = | 60 |
| name | [R] | |
| peer_pieces | [R] |
the Controller calls this from heartbeat thread to tell us whether to choke or not.