Wrapper Functions for rzmq {pbdZMQ}R Documentation

All Wrapper Functions for rzmq

Description

Wrapper functions for backwards compatibility with rzmq. See vignette for examples.

Usage

send.socket(
  socket,
  data,
  send.more = FALSE,
  serialize = TRUE,
  serialversion = NULL
)

receive.socket(socket, unserialize = TRUE, dont.wait = FALSE)

init.context()

init.socket(context, socket.type)

bind.socket(socket, address)

connect.socket(socket, address)

Arguments

socket

A ZMQ socket.

data

An R object.

send.more

Logical; will more messages be sent?

serialize, unserialize

Logical; determines if serialize/unserialize should be called on the sent/received data.

serialversion

NULL or numeric; the workspace format version to use when serializing. NULL specifies the current default version. The only other supported values are 2 and 3.

dont.wait

Logical; determines if reception is blocking.

context

A ZMQ context.

socket.type

The type of ZMQ socket as a string, of the form "ZMQ_type". Valid 'type' values are PAIR, PUB, SUB, REQ, REP, DEALER, PULL, PUSH, XPUB, XSUB, and STERAM.

address

A valid address. See details.

Details

send.socket()/receive.socket() send/receive messages over a socket. These are simple wrappers around zmq.msg.send() and zmq.msg.receive(), respectively.

init.context() creates a new ZeroMQ context. A useful wrapper around zmq.ctx.new() which handles freeing memory for you, i.e. zmq.ctx.destroy() will automatically be called for you.

init.socket() creates a ZeroMQ socket; serves as a high-level binding for zmq.socket(), including handling freeing memory automatically. See also ZMQ.ST().

bind.socket(): see zmq.bind().

connect.socket(): see zmq.connect()

Author(s)

Wei-Chen Chen wccsnow@gmail.com.

References

ZeroMQ/4.1.0 API Reference: https://libzmq.readthedocs.io/en/zeromq4-1/

Programming with Big Data in R Website: https://pbdr.org/


[Package pbdZMQ version 0.3-11 Index]