The ZContext class implements a ZeroMQ context.
More...
The ZContext class implements a ZeroMQ context.
- Restrictions:
- Qore::PO_NO_NETWORK
The context is terminated in the destructor
◆ constructor()
Qore::ZMQ::ZContext::constructor |
( |
| ) |
|
◆ copy()
Qore::ZMQ::ZContext::copy |
( |
| ) |
|
Throws an exception; ZContext objects cannot be copied.
- Exceptions
-
ZCONTEXT-COPY-ERROR | this exception is thrown if any attempt is made to copy a ZContext object |
◆ getOption()
int Qore::ZMQ::ZContext::getOption |
( |
int |
opt | ) |
|
Retrieves the value of the given option on the context.
- Code Flags:
- RET_VALUE_ONLY
- Example:
int val = ctx.getOption(ZMQ_IPV6);
- Parameters
-
- Returns
- the integer value of the given option
- Exceptions
-
ZCONTEXT-GETOPTION-ERROR | this exception is thrown if there is any error setting the option |
◆ setOption()
nothing Qore::ZMQ::ZContext::setOption |
( |
int |
opt, |
|
|
int |
value |
|
) |
| |
Sets the given option on the context.
- Example:
ctx.setOption(ZMQ_IPV6, 1);
- Parameters
-
opt | the option number; see ZContext Options for possible values |
value | the integer value to set |
- Exceptions
-
ZCONTEXT-SETOPTION-ERROR | this exception is thrown if there is any error setting the option |
◆ shutdown()
nothing Qore::ZMQ::ZContext::shutdown |
( |
| ) |
|
Shuts the context down.
- Example:
Context shutdown will cause any blocking operations currently in progress on sockets open within context to return immediately with an error code of ETERM
which causes a Qore-language exception to be raised..
With the exception of closing the socket, any further operations on sockets open within context shall fail with an error code of ETERM
, causing Qore- language exceptions to be thrown.
- Exceptions
-
ZCONTEXT-SHUTDOWN-ERROR | this exception is thrown if there is any error in this method call |
The documentation for this class was generated from the following file: