The default mode 'serial' sends serialised R objects to ensure perfect
reproducibility within R. When receiving, the corresponding mode 'serial'
should be used.
Mode 'raw' sends atomic vectors of any type as a raw byte vector, and
must be used when interfacing with external applications or raw system
sockets, where R serialization is not in use. When receiving, the mode
corresponding to the vector sent should be used.
Mode 'next' sends serialised R objects, with native extensions enabled by
next_config
. This configures custom serialization and
unserialization functions for external pointer reference objects. When
receiving, mode 'serial' should be used as 'next' sends are fully
compatible.