Home | Trees | Index | Help |
---|
Package spoon :: Package transports :: Module SpoonTransport :: Class SpoonTransport |
|
object
--+
|
SpoonTransport
The spoon transport base class. This will probably mostly be responsible for handling locking on the transport. It also takes care of removing itself from the transport hub if it is made inactive.
Any reads or writes on the socket should be performed with the SpoonTransport, or otherwise synchronized once this is created.Method Summary | |
---|---|
Creates a spoon transport link out of an existing socket and joins it to a network. | |
__get_active(self)
| |
__repr__(self)
| |
__set_active(self,
newval)
| |
close(self)
| |
Returns the fileno for use in a select or poll call if one exists for the socket or file wrapped by this SpoonTransport. | |
override this if your class does any pre authentication. | |
getNetwork(self)
| |
read(self)
| |
Starts the spoon protocol on the socket. | |
write(self,
obj)
| |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Variable Summary | |
---|---|
active : Indicates if the transport is currently active. | |
sock : The raw socket or file object that the transport is bound to | |
spoon : The SpoonStream wrapper around the socket. |
Method Details |
---|
__init__(self,
t,
network=None)
Creates a spoon transport link out of an existing socket and joins
it to a network. This network is either a mesh network or a point to
point network (just a direct connection.)
|
fileno(self)Returns the fileno for use in a select or poll call if one exists for the socket or file wrapped by this SpoonTransport. If the socket or file does not have a fileno method, None will be returned. For proper behavior with paramiko, fileno on the socket isn't called any time before fileno is called on the SpoonTransport. |
getAuthedNodeId(self)override this if your class does any pre authentication. |
start(self)Starts the spoon protocol on the socket. Must be called before writing/reading with the SpoonTransport object. Will cause the Transport to be registered with TransportHub. |
Instance Variable Details |
---|
activeIndicates if the transport is currently active. |
sockThe raw socket or file object that the transport is bound to |
spoonThe SpoonStream wrapper around the socket. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sun Nov 26 15:33:58 2006 | http://epydoc.sf.net |