简体   繁体   中英

Python autobahn WAMP Messaging Protocol


I`m pipeing WAMP protocol through Pythons multiprocessing.pipe, and I nead to reimplement WampCraClientProtocol.

Question A: In the ambiguous case of:

exclude  = ['ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003']
eligible = ['ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003']
[TYPE_ID_PUBLISH, topicURI, event, exclude, eligible]

# Is the exclude or eligible stronger?
# (Can I do following?)

exclude  = set('ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003')
eligible = set('ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003')
eligible -= exclude
[TYPE_ID_PUBLISH, topicURI, event, [], list(eligible)]


Question B: can excludeMe all ways be replaced with [self.session_id] ?

[TYPE_ID_PUBLISH, topicURI, event, excludeMe] ==
[TYPE_ID_PUBLISH, topicURI, event, [self.session_id]]


/Aki R.

Question A: the case is not ambiguous - the message wont be received by anyone. The logic is: (Subscribers AND Eligible) \\ Exclude.

Question B: Both messages will result in the same behavior of the broker.

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