Learn R Programming

nanonext (version 0.2.0)

send_vec: Send Vector

Description

DEPRECATED [Use send specifying mode = 'raw'] Send vector data over a Socket. Data will be sent as binary without R serialisation, hence appropriate for interfacing with external programs.

Usage

send_vec(socket, data, block = FALSE, echo = TRUE)

Arguments

socket

a Socket.

data

a vector. Will be converted and sent as raw unless already a raw vector in which case it will be sent unmodified.

block

[default FALSE] logical flag whether to block until successful or return immediately even if unsuccessful (e.g. no connection available).

echo

[default TRUE] logical flag whether to return the raw vector of sent data. Set to FALSE for performance-critical applications where invisble NULL will be returned instead.

Value

Raw vector of sent data, or invisible NULL if 'echo' is set to FALSE.