How do I feed long JSON documents via UDP? #965
Unanswered
pavel-kirienko
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to feed a sequence of long JSON messages, several KiB each, via the UDP server, but I am unable to do that because I think
nc
breaks my message into 1 KiB chunks (1024 bytes) which results in an "unexpected end of input" error:I am using it as follows:
my_command | nc -u localhost 9870
my_command
outputs large newline-separated JSON dicts. Here's one (it is a perfectly valid JSON dict):How do I make the UDP server wait for newline before attempting to parse the message? Or am I misunderstanding the nature of the problem?
Beta Was this translation helpful? Give feedback.
All reactions