twisted.protocols.socksView Source (View In Hierarchy)
An implementation of the SOCKSv4 protocol.
|Instance Variable||logging||If not
|Instance Variable||reactor||The reactor used to create connections. (type: object providing
|Instance Variable||buf||Part of a SOCKSv4 connection request. (type:
|Instance Variable||otherConn||Until the connection has been established,
|Method||connectionMade||Called when a connection is made.|
|Method||dataReceived||Called whenever data is received.|
|Method||connectionLost||Called when the connection is shut down.|
|Method||_dataReceived2||The second half of the SOCKS connection setup. For a SOCKSv4 packet this is after the server address has been extracted from the header. For a SOCKSv4a packet this is after the host name has been resolved.|
Inherited from Protocol:
|Method||logPrefix||Return a prefix matching the class name, to identify log messages related to this protocol instance.|
|Method||makeConnection||Make a connection to a transport and a server.|
Called when a connection is made.
This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
The second half of the SOCKS connection setup. For a SOCKSv4 packet this is after the server address has been extracted from the header. For a SOCKSv4a packet this is after the host name has been resolved.
|Parameters||server||The IP address of the destination, represented as a dotted quad. (type: |
|user||The username associated with the connection. (type: |
|version||The SOCKS protocol version number. (type: |
|code||The comand code. 1 means establish a TCP/IP stream connection, and 2 means
establish a TCP/IP port binding. (type: |
|port||The port number associated with the connection. (type: |