Conversation
|
|
||
| int rv; | ||
| nng_msg * msg; | ||
| char * line = NULL; |
There was a problem hiding this comment.
Minor indenting error. We use indents by tab, where the tab is 8 cells wide. Please see our .clang-format.
|
This PR is unfortunately port portable (see the windows failures). May consider converting it to use stdio (which is supported under all ANSI C platforms, including Windows.) |
|
this is a very nice feature - thanks! |
gdamore
left a comment
There was a problem hiding this comment.
This needs to be converted to use fgets() or something portable in lieu of getline().
And I'd appreciate it if you could run this through clang-format.
|
I took the original commit, switched it to fgets and ran clang-format on the file on my branch here [1] - I'm never sure the best way to move this type of thing forward. Should I just create a new pull request? |
It would be nice for nngcat to be able to send a stream of data from a unix pipe (stdin or a named pipe file). This is impossible to do with the existing --file option, which reads the data into memory, then sends it one or more times. With the proposed --pipe option, each line from the specified pipe is sent as a message. This is more similar to how the
ncandsocatutilities function.