简体   繁体   中英

Caller identification in Autobahn | Python

I am trying to find out how to disclose the caller in Autobahn|Python as described here: http://crossbar.io/docs/Caller-Identification/ I found the following in the docs :

class autobahn.wamp.message.Call(request, procedure, args=None, kwargs=None, timeout=None, receive_progress=None, disclose_me=None)

and therefore tried:

res = session.call(u'com.example.function', data, disclose_me=True)

with no luck. Any help would be sincerely appreciated.

OK, I figured it out:

from autobahn.wamp.types import CallOptions

options = CallOptions(on_progress=None, timeout=120, disclose_me=True)
res = session.call(u'com.example.function', server_events, options=options)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM