summaryrefslogtreecommitdiffhomepage
path: root/ryu/lib/rpc.py
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-11-28 14:30:04 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-11-29 09:23:41 +0900
commit220b9e2ca73afaaeff72c53482e21bd282430c61 (patch)
treec72acc71187d694758c60730b52b8fd95f9ff315 /ryu/lib/rpc.py
parent21f4f64061ad0efbe58e2f51232e3179f841fb56 (diff)
add rpc.Client.peek_notification
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'ryu/lib/rpc.py')
-rw-r--r--ryu/lib/rpc.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ryu/lib/rpc.py b/ryu/lib/rpc.py
index 3aa476dd..010f0a80 100644
--- a/ryu/lib/rpc.py
+++ b/ryu/lib/rpc.py
@@ -304,3 +304,11 @@ class Client(object):
raise EOFError("EOF")
self._process_input_notification()
self._process_input_request()
+
+ def peek_notification(self):
+ while True:
+ rlist, _wlist = self._endpoint.selectable()
+ rlist, _wlist, _xlist = select.select(rlist, [], [], 0)
+ if not rlist:
+ break
+ self.receive_notification()