示例#1
0
文件: zmq4.go 项目: rayqiu/zmq4
/*
Terminates the context.

For linger behavior, see: http://api.zeromq.org/4-0:zmq-ctx-term
*/
func Term() error {
	n, err := C.zmq_ctx_term(ctx)
	if n != 0 {
		return errget(err)
	}
	return nil
}
示例#2
0
文件: zmq4.go 项目: gallir/zmq4
/*
Terminates the context.

For linger behavior, see: http://api.zeromq.org/4-1:zmq-ctx-term
*/
func (ctx *Context) Term() error {
	if ctx.opened {
		ctx.opened = false
		n, err := C.zmq_ctx_term(ctx.ctx)
		if n != 0 {
			ctx.err = errget(err)
		}
	}
	return ctx.err
}