Last active
August 29, 2015 13:59
-
-
Save matthijskooijman/10489774 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sending "fooxbar" | |
Now: | |
MESH: "foox" | |
HQ: {"type":"reply","id":%d,"from":%d,"reply":"foox"} | |
MESH: "bar\0" | |
HQ: {"type":"reply","id":%d,"from":%d,"reply":"bar", end: true} | |
New: | |
MESH: {"type":"reply","id":%d,"from":%d,"reply":"foox"} | |
HQ: {"type":"reply","id":%d,"from":%d,"reply":"foox"} | |
MESH: {"type":"reply","id":%d,"from":%d,"reply":"bar", end: true} | |
HQ: {"type":"reply","id":%d,"from":%d,"reply":"bar", end: true} | |
// downside: large mesh overhead | |
Alternative: | |
MESH: {"type":"reply","id":%d,"from":%d,"reply":"foox | |
HQ: {"type":"reply","id":%d,"from":%d,"reply":"foox | |
MESH: bar", end: true} | |
HQ: bar", end: true} | |
// This doesn't have the overhead, but blocks the HQ connection | |
// Also, this effectively changes the HQ protocol, it now sends the | |
// reply in a single packet instead of two |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment