| Trees | Indices | Help |
|
|---|
|
|
Read the handshake and hand a new socket connection off to where it belongs.
This class wraps some of the functionality of the BT1.Encrypter.Connection class. It will receive connections from the Server, read the protocol handshake, assign them to the proper torrent server, and pass the connection on to the Encrypter Connection.
|
|||
|
|||
|
|||
|
|||
int, method
|
|
||
int, method
|
|
||
int, method
|
|
||
boolean
|
|
||
int, method
|
|
||
boolean
|
|
||
int, method
|
|
||
boolean
|
|
||
none
|
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int
|
_max_search the number of remaining bytes to search for the pattern |
||
string
|
buffer the buffer of unprocessed data received on the connection |
||
boolean
|
closed whether the connection has been closed |
||
boolean
|
complete whether the handshake is complete |
||
| SocketServer.SingleSocket |
connection the connection to handle |
||
boolean
|
encrypted whether the connection is encrypted |
||
| BTcrypto.Crypto |
encrypter the encrypter to use for the connection |
||
| MultiHandler |
multihandler the collection of all torrent Servers |
||
method
|
next_func the method to call to read the protocol name from the connection |
||
int
|
next_len the length of the protocol name header in the connection |
||
string
|
options the protocol options read from the connection |
||
string
|
protocol the protocol name used by the connection |
||
method
|
read the method to call to read data from the connection |
||
method
|
write the method to call to write data to the connnection |
||
|
|||
|
|
|
|
|
|
Process the block3b crypto information in the connection. Passes the connection off to the appropriate torrent's Server if the correct block is found.
|
|
Read the torrent infohash from the connection. Passes the connection off to the appropriate torrent's Server.
|
|
|
|
Process the data read from the connection. Processes incoming data on the connection. The data is bufferred, then the next_func method is called with the next_len amount of the data. If it returns None, the connection is closed. If it returns True, the connection handshake is complete and the connection is established. Otherwise it returnsint,method, which is the next length to read
and method to call with the data. If the length is 0, it will read all
the available data. If the length is -1 it will wait for more data to
caome in.
|
|
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Aug 19 16:26:55 2007 | http://epydoc.sourceforge.net |