nbxmpp.proxy_connectors.ProxyConnector

Package nbxmpp :: Module proxy_connectors :: Class ProxyConnector |
[hide private]
[frames] | no frames]

# Class ProxyConnector

source code

Interface for proxy-connecting object - when tunnneling XMPP over proxies, some connecting process usually has to be done before opening stream. Proxy connectors are used right after TCP connection is estabilished

Instance Methods | [hide private]
__init__(self, send_method, onreceive, old_on_receive, on_success, on_failure, xmpp_server, proxy_creds=`(`None`,` None`)`) Creates proxy connector, starts connecting immediately and gives control back to transport afterwards | source code
start_connecting(self) | source code
connecting_over(self) | source code

Class Methods | [hide private]
get_instance(cls, *args, **kwargs) Factory Method for object creation | source code

Method Details | [hide private]

### __init__(self, send_method, onreceive, old_on_receive, on_success, on_failure, xmpp_server, proxy_creds=`(`None`,` None`)`) (Constructor) | source code
Creates proxy connector, starts connecting immediately and gives control back to transport afterwards Parameters: `send_method` - transport send method `onreceive` - method to set on_receive callbacks `old_on_receive` - on_receive callback that should be set when proxy connection was successful `on_success` - called after proxy connection was successfully opened `on_failure` - called when errors occured while connecting `xmpp_server` - tuple of (hostname, port) `proxy_creds` - tuple of (proxy_user, proxy_credentials)

### get_instance(cls, *args, **kwargs) Class Method | source code
Factory Method for object creation Use this instead of directly initializing the class in order to make unit testing much easier.

### start_connecting(self) | source code

### connecting_over(self) | source code