Commit c91048f9 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add shortcuts from node to connection.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1818 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6b0d9e6e
......@@ -35,6 +35,18 @@ class Node(object):
self._last_state_change = time()
self._connection = None
def notify(self, packet):
assert self.isConnected(), 'Not connected'
self._connection.notify(packet)
def ask(self, packet, timeout=5, additional_timeout=30):
assert self.isConnected(), 'Not connected'
self._connection.ask(packet, timeout, additional_timeout)
def answer(self, packet, msg_id=None):
assert self.isConnected(), 'Not connected'
self._connection.answer(packet, msg_id)
def getLastStateChange(self):
return self._last_state_change
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment