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

CBOR: encode then write #201

Open
rayhaanj opened this issue Jan 29, 2019 · 1 comment
Open

CBOR: encode then write #201

rayhaanj opened this issue Jan 29, 2019 · 1 comment

Comments

@rayhaanj
Copy link
Contributor

Please note that in the current SCION UDP implementation, we are marshaling the RAINS message first then writing it at once to the connection object. This is because if we use the connection as a io.Writer and pass that in to the CBOR library, eliminating the buffer, then parts of the message get written to the underlying transport one by one.

The effect of this in a UDP setting is that the message gets split up over multiple UDP packets, and the receiver then cannot make sense of the received data because (my guess is) there is no logic to wait for more data on the UDP stream maybe?

@rayhaanj
Copy link
Contributor Author

The associated PR which does this for the ZonePublisher is #199

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

1 participant