Send data asynchronously over a connection (Socket, Context or Stream).
send_aio(con, data, mode = c("serial", "raw"), timeout = NULL)
a Socket, Context or Stream.
an object (a vector, if mode = 'raw').
[default 'serial'] for sending serialised R objects, or 'raw' for sending vectors of any type (converted to a raw byte vector for sending). For Streams, 'raw' is the only option and this argument is ignored. Use 'serial' for perfect reproducibility within R, although 'raw' must be used when interfacing with external applications that do not understand R serialisation.
[default NULL] integer value in milliseconds or NULL, which applies a socket-specific default, usually the same as no timeout.
A 'sendAio' (object of class 'sendAio').
Async send is always non-blocking and returns a 'sendAio' immediately.
For a 'sendAio', the send result is available at
'unresolved' logical NA is returned if the async operation is yet to
complete, The resolved value will be zero on success, or else an integer
To wait for and check the result of the send operation, use
call_aio on the returned 'sendAio' object.
Alternatively, to stop the async operation, use