Learn R Programming

nanonext (version 0.1.0)

send: Send

Description

Send data over a Socket. For sending and receiving within R. Objects are sent serialized to ensure perfect reproducibility.

Usage

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

Arguments

socket

a Socket.

data

an R object, which will be sent serialized.

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.

Examples

Run this code
# NOT RUN {
pub <- socket("pub", dial = "inproc://nanonext")

send(pub, data.frame(a = 1, b = 2))

close(pub)

# }

Run the code above in your browser using DataLab