diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2013-11-28 14:30:04 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-11-29 09:23:41 +0900 |
commit | 220b9e2ca73afaaeff72c53482e21bd282430c61 (patch) | |
tree | c72acc71187d694758c60730b52b8fd95f9ff315 /ryu/lib/rpc.py | |
parent | 21f4f64061ad0efbe58e2f51232e3179f841fb56 (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.py | 8 |
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() |