init.context: initailize zmq context and zmq socket

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/rzmq.R

Description

initialize zmq context and zmq socket for to be used for further zmq operations.

Usage

1
2
init.context(threads=1L)
init.socket(context, socket.type)

Arguments

threads

number of threads for the context to use

context

a zmq context object.

socket.type

The ZMQ socket type requested e.g. ZMQ_REQ,ZMQ_REP,ZMQ_PULL,ZMQ_PUSH, etc.

Value

init.context returns a zmq context object. init.socketreturns a zmq socket object.

Author(s)

ZMQ was written by Martin Sustrik <[email protected]> and Martin Lucina <[email protected]>. rzmq was written by Whit Armstrong.

References

http://www.zeromq.org http://api.zeromq.org http://zguide.zeromq.org/page:all

See Also

connect.socket,bind.socket,receive.socket,send.socket,poll.socket

Examples

1
2
3
4
5
6
7
## Not run: 

library(rzmq)
context = init.context()
in.socket = init.socket(context,"ZMQ_PULL")

## End(Not run)

armstrtw/rzmq documentation built on Aug. 3, 2019, 7:33 a.m.