| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/R_zmq_context.r |
| 3 |
\name{Context Functions} |
| 4 |
\alias{Context Functions} |
| 5 |
\alias{zmq.ctx.new} |
| 6 |
\alias{zmq.ctx.destroy} |
| 7 |
\title{Context Functions} |
| 8 |
\usage{ |
| 9 |
zmq.ctx.new() |
| 10 |
|
| 11 |
zmq.ctx.destroy(ctx) |
| 12 |
} |
| 13 |
\arguments{ |
| 14 |
\item{ctx}{a ZMQ context} |
| 15 |
} |
| 16 |
\value{ |
| 17 |
\code{zmq.ctx.new()} returns an R external pointer (\code{ctx}) |
| 18 |
generated by ZMQ C API pointing to a context if successful, otherwise |
| 19 |
returns an R \code{NULL}. |
| 20 |
|
| 21 |
\code{zmq.ctx.destroy()} returns 0 if successful, otherwise returns -1 and |
| 22 |
sets \code{errno} to either \code{EFAULT} or \code{EINTR}. |
| 23 |
} |
| 24 |
\description{ |
| 25 |
Context functions |
| 26 |
} |
| 27 |
\details{ |
| 28 |
\code{zmq.ctx.new()} initializes a ZMQ context for starting communication. |
| 29 |
|
| 30 |
\code{zmq.ctx.destroy()} terminates the context for stopping communication. |
| 31 |
} |
| 32 |
\examples{ |
| 33 |
\dontrun{ |
| 34 |
library(pbdZMQ, quietly = TRUE) |
| 35 |
|
| 36 |
context <- zmq.ctx.new() |
| 37 |
zmq.ctx.destroy(context) |
| 38 |
} |
| 39 |
|
| 40 |
} |
| 41 |
\references{ |
| 42 |
ZeroMQ/4.1.0 API Reference: |
| 43 |
\url{https://libzmq.readthedocs.io/en/zeromq4-1/} |
| 44 |
|
| 45 |
Programming with Big Data in R Website: \url{https://pbdr.org/} |
| 46 |
} |
| 47 |
\seealso{ |
| 48 |
\code{\link{zmq.socket}()}, \code{\link{zmq.close}()}, |
| 49 |
\code{\link{zmq.bind}()}, \code{\link{zmq.connect}()}. |
| 50 |
} |
| 51 |
\author{ |
| 52 |
Wei-Chen Chen \email{[email protected]}. |
| 53 |
} |
| 54 |
\keyword{programming} |