Package common :: Package zeroconf :: Module client_zeroconf :: Class P2PConnection
[hide private]
[frames] | no frames]

Class P2PConnection

source code


Instance Methods [hide private]
 
__init__(self, sock_hash, _sock, host=None, port=None, caller=None, on_connect=None, client=None) source code
 
connect_to_next_ip(self) source code
 
set_timeout(self, timeout) source code
 
plugin(self, owner) source code
 
plugout(self)
Disconnect from the remote server and unregister self.disconnected method from the owner's dispatcher
source code
 
onreceive(self, recv_handler) source code
 
send(self, packet, is_message=False, now=False)
Append stanza to the queue of messages to be send if now is False, else send it instantly
source code
 
read_timeout(self)
Called when timeout happened
source code
 
do_connect(self) source code
 
pollout(self)
Called on new write event (connect in sockets is a pollout)
source code
 
pollend(self)
Called on stream failure
source code
 
pollin(self)
Reads all pending incoming data.
source code
 
disconnect(self, message='')
Close the socket
source code
 
_do_send(self) source code
 
_plug_idle(self) source code
 
_on_send(self) source code
 
_on_send_failure(self) source code
Instance Variables [hide private]

Inherited from xmpp.idlequeue.IdleObject: fd

Method Details [hide private]

__init__(self, sock_hash, _sock, host=None, port=None, caller=None, on_connect=None, client=None)
(Constructor)

source code 
Overrides: xmpp.idlequeue.IdleObject.__init__

connect_to_next_ip(self)

source code 

set_timeout(self, timeout)

source code 

plugin(self, owner)

source code 

plugout(self)

source code 
Disconnect from the remote server and unregister self.disconnected method from the owner's dispatcher

onreceive(self, recv_handler)

source code 

send(self, packet, is_message=False, now=False)

source code 

Append stanza to the queue of messages to be send if now is False, else send it instantly

If supplied data is unicode string, encode it to UTF-8.

read_timeout(self)

source code 
Called when timeout happened
Overrides: xmpp.idlequeue.IdleObject.read_timeout
(inherited documentation)

do_connect(self)

source code 

pollout(self)

source code 
Called on new write event (connect in sockets is a pollout)
Overrides: xmpp.idlequeue.IdleObject.pollout
(inherited documentation)

pollend(self)

source code 
Called on stream failure
Overrides: xmpp.idlequeue.IdleObject.pollend
(inherited documentation)

pollin(self)

source code 
Reads all pending incoming data. Call owner's disconnected() method if appropriate
Overrides: xmpp.idlequeue.IdleObject.pollin

disconnect(self, message='')

source code 
Close the socket

_do_send(self)

source code 

_plug_idle(self)

source code 

_on_send(self)

source code 

_on_send_failure(self)

source code