SolarCapture C Bindings User Guide  SF-115721-CD
Draft 2A
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sc_fd_writer Node Reference

Write data to a file descriptor.

Detailed Description

This node writes the raw contents of each incoming packet to a file descriptor. It can be used to write data into a file, socket, pipe etc.

The contents of each sc_packet arriving at this node is written with a single writev() call (or equivalent). If the file descriptor is a datagram socket then each sc_packet generates a single datagram.

If the file descriptor supports non-blocking writes then this node uses epoll to avoid blocking the thread.

Arguments

Argument Optional? Default Type Description
fd No SC_PARAM_INT File descriptor to write data to.
close_on_eos Yes 0 SC_PARAM_INT Whether to close the file descriptor when the end-of-stream signal is received.

Output Links

Link Description
"" Input packets are forwarded to this output once written.