From 0cac5292649389fc10c3ba5c22572ecae036ffbc Mon Sep 17 00:00:00 2001 From: chenxy123 Date: Sun, 9 Oct 2016 23:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0rpc=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E7=9A=84=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=B8=BB=E9=A2=98=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/Windows Azure Subscriptions.xml | 2 +- vn.rpc/testClient.py | 4 ++-- vn.rpc/vnrpc.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vn.ib/vnib/Visual Studio 2013/settings/Windows Azure Subscriptions.xml b/vn.ib/vnib/Visual Studio 2013/settings/Windows Azure Subscriptions.xml index ee4dca4d..c99985de 100644 --- a/vn.ib/vnib/Visual Studio 2013/settings/Windows Azure Subscriptions.xml +++ b/vn.ib/vnib/Visual Studio 2013/settings/Windows Azure Subscriptions.xml @@ -1,5 +1,5 @@ - AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAhuIZgFnYcU6wvp5DI4FozAAAAAACAAAAAAAQZgAAAAEAACAAAADbHX9MGY1db5F4b+OyG6c/B78GOMBlEj6iQbaFcLZJCAAAAAAOgAAAAAIAACAAAADn7kKZgsW4pBHXuVEmex+oXTGG5hNRZGiXkpNGYXsFPBAAAACHqHiPVtiM03bftyY0V78iQAAAACpQVRyEMAhwGyl6Ekto5M6tZRU4Nu9lGQ6I+0d85GOVYFPsld6n8j1heCXRQ5facD4R4R9fqjq858G/Iyjl0vQ= + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAhuIZgFnYcU6wvp5DI4FozAAAAAACAAAAAAAQZgAAAAEAACAAAAAP+ZejtWt08T4CHAObG1FMrnjuDrDgxp3Kgz3p0GFTiAAAAAAOgAAAAAIAACAAAADnqXDqufrv721M+KR/tLuCYzN6ynSphcMeiL+hw9/zfBAAAAA0xC0ncTgoWKgyHhV01sFjQAAAAHPVrjN2gp4P8U/lDH6S7DXnH0r85ILsW5BB0pf0XLyQTdX5KoNz8//d+jBnTKg15QzO9mS8Bc1TVIuzVWasdjI= \ No newline at end of file diff --git a/vn.rpc/testClient.py b/vn.rpc/testClient.py index 643cb916..6df0305f 100644 --- a/vn.rpc/testClient.py +++ b/vn.rpc/testClient.py @@ -15,9 +15,9 @@ class TestClient(RpcClient): super(TestClient, self).__init__(reqAddress, subAddress) #---------------------------------------------------------------------- - def callback(self, data): + def callback(self, topic, data): """回调函数实现""" - print 'client received:', data + print 'client received topic:', topic, ', data:', data if __name__ == '__main__': diff --git a/vn.rpc/vnrpc.py b/vn.rpc/vnrpc.py index 86e97ef2..83593562 100644 --- a/vn.rpc/vnrpc.py +++ b/vn.rpc/vnrpc.py @@ -241,10 +241,10 @@ class RpcClient(RpcObject): data = self.unpack(datab) # 调用回调函数处理 - self.callback(data) + self.callback(topic, data) #---------------------------------------------------------------------- - def callback(self, data): + def callback(self, topic, data): """回调函数,必须由用户实现""" raise NotImplementedError