func getOption(o C.int) (int, error) { nc, err := C.zmq_ctx_get(ctx, o) n := int(nc) if n < 0 { return n, errget(err) } return n, nil }
func getOption(ctx *Context, o C.int) (int, error) { if !ctx.opened { return 0, ErrorContextClosed } nc, err := C.zmq_ctx_get(ctx.ctx, o) n := int(nc) if n < 0 { return n, errget(err) } return n, nil }
// Get a context option. // int zmq_ctx_get (void *c, int); func (c *Context) get(option C.int) (int, error) { if c.init(); c.err != nil { return -1, c.err } var value C.int var err error if value, err = C.zmq_ctx_get(c.c, option); err != nil { return -1, casterr(err) } return int(value), nil }