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

receive json though tcp from no jot sender #3

Open
ppsirg opened this issue Jan 19, 2016 · 2 comments
Open

receive json though tcp from no jot sender #3

ppsirg opened this issue Jan 19, 2016 · 2 comments

Comments

@ppsirg
Copy link

ppsirg commented Jan 19, 2016

hello,

i have to send data from a tornado application (python) to a server that listens with jot, im not nodejs expert but inspecting raw data that comes i figure it out there is some "headers" with the json info, in the nodejs code the developers deleted that "header" to use the json data, what is that "header", is a random string?, how can i build it?

thanks for your help

@ppsirg
Copy link
Author

ppsirg commented Jan 20, 2016

i see there are some null characters but there is also other characters i dont know how to generate, im getting data like this one in the reading server

�\u0000�\u0000\u0000\u0000{cool json data here}

@georgii-ivanov
Copy link

georgii-ivanov commented Sep 18, 2017

The header is just header data. Start byte + packet size + data.
It's good pattern because TCP is the streaming protocol (not messaging).

If you're true python coder you have to unpack data (by shifting 2+4 bytes). But you should remember about coalescing and chunking tcp data.

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