crossbario / autobahn-java

WebSocket & WAMP in Java for Android and Java 8
https://crossbar.io/autobahn
MIT License
1.52k stars 427 forks source link

Support customize subscribe.options && compatible with null value for type int #514

Closed cyrushine closed 3 years ago

cyrushine commented 3 years ago
  1. according to https://wamp-proto.org/_static/gen/wamp_latest.html#subscribe-0, message SUBSCRIBE.Options is a dict that allows to provide additional subscription request details in a extensible way
  2. make java type int/long compatible with null value of wamp type int
oberstet commented 3 years ago

thanks for contributing!

rgd custom (implementation defined, rather than official protocol defined) attributes: the library should only accept attribute names x_* for custom attributes .. this isn't yet in the spec, but consensus https://github.com/wamp-proto/wamp-proto/issues/345 and also how (at least) some implementations handle this already .. yeah, sorry, we should really land this in the spec text.

cyrushine commented 3 years ago

👌

oberstet commented 3 years ago

@om26er what do you think rgd the PR? good to merge? in general, the AB libraries should allow users to use custom attributes in "options". such custom options must have attribute names starting with "x_". other attribute names must be from the list of officially supported (eg "excludeauthroles" or similar). do we want to check/enforce that in the ABPy client side library? eg Crossbar.io will kill a session that uses non-standard attribute names that do not start with "x" - but we certainly could add such checks later in a subsequent change (as this PR doesn't protect from using illegal names ..)

om26er commented 3 years ago

Yep, looks good to me. We can add the protection for illegal names later.