Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Notification discrepancy #1

Closed
gtaylor opened this issue Jan 22, 2015 · 1 comment
Closed

Possible Notification discrepancy #1

gtaylor opened this issue Jan 22, 2015 · 1 comment

Comments

@gtaylor
Copy link

gtaylor commented Jan 22, 2015

I noticed the following example:

+---------------------- Notification
|              +--------- type        "chat message"
|              |       +- payloadSize 50
|              |       |
n00cchat message00000032{"message":"Hi","from":"nthn","chat_room":"gonuts"}

With the following definition:

Notification    = "n" type payload

type            = text3
payload         = payloadSize payloadData?
payloadSize     = hexUInt8
payloadData     = <byte>{payloadSize}

text3           = text3Size text3Value
text3Size       = hexUInt3
text3Value      = <<byte>{text3Size} as utf8 text>

It looks like the text3 isn't documented in the example. Should be:

+---------------------- Notification
|  +--------------------- text3Size   12
|  |           +--------- type        "chat message"
|  |           |       +- payloadSize 50
|  |           |       |
n00cchat message00000032{"message":"Hi","from":"nthn","chat_room":"gonuts"}

This tripped me up a little when working on a quick and dirty Python implementation: https://github.com/gtaylor/python-gotalk

@rsms
Copy link
Owner

rsms commented Jan 23, 2015

Good catch. However text3Size has been omitted for the sake of readability. The same is done with the StreamRequest example.

@rsms rsms closed this as completed in ecceac7 Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants