apaste
Software
skarnet.org

The apastec program

apastec is a program that reads one or more files, or its standard input, and sends them to a preopened file descriptor.

Interface

     apastec [ -r rtimeout ] [ -w wtimeout ] file...

Exit codes

0
Success. The data has been recorded by the server and available in some way as indicated by the slug.
100
Bad usage. apaste was run in an incorrect way.
111
System call failed. This usually signals an issue with the underlying operating system, or with the network in some way.

Options

-r rtimeout
If the server isn't answering with a slug within rtimeout milliseconds, give up. The default is 0, meaning infinite: apastec will wait forever for a server reply if necessary.
-w wtimeout
If the server hasn't accepted all the data within wtimeout milliseconds, give up. The default is 0, meaning infinite: apastec will take as much time as it needs to send its data.

Typical usage

apastec isn't meant to be used directly. It is meant to be invoked as part of a command line crafted by the apaste command, where programs from the s6-networking package establish the connection to the server, then exec into apastec to read the user's data and transmit them with the apaste protocol.

Notes