/* Start built-in ØMQ proxy See: http://api.zeromq.org/3-2:zmq-proxy */ func Proxy(frontend, backend, capture *Socket) error { var capt unsafe.Pointer if capture != nil { capt = capture.soc } _, err := C.zmq_proxy(frontend.soc, backend.soc, capt) return errget(err) }
// run a zmq_proxy with in, out and capture sockets func Proxy(in, out, capture *Socket) error { var c unsafe.Pointer if capture != nil { c = capture.apiSocket() } if rc, err := C.zmq_proxy(in.apiSocket(), out.apiSocket(), c); rc != 0 { return casterr(err) } return errors.New("zmq_proxy() returned unexpectedly.") }
/* Start built-in ØMQ proxy See: http://api.zeromq.org/4-1:zmq-proxy#toc2 */ func Proxy(frontend, backend, capture *Socket) error { if !(frontend.opened && backend.opened && (capture == nil || capture.opened)) { return ErrorSocketClosed } var capt unsafe.Pointer if capture != nil { capt = capture.soc } _, err := C.zmq_proxy(frontend.soc, backend.soc, capt) return errget(err) }
// run a zmq_proxy with in, out and capture sockets func Proxy(in, out, capture Socket) error { if C.zmq_proxy(in.apiSocket(), out.apiSocket(), capture.apiSocket()) != 0 { return errno() } return errors.New("zmq_proxy() returned unexpectedly.") }
// run a zmq_proxy with in, out and capture sockets func Proxy(in, out, capture Socket) error { if rc, err := C.zmq_proxy(in.apiSocket(), out.apiSocket(), capture.apiSocket()); rc != 0 { return casterr(err) } return errors.New("zmq_proxy() returned unexpectedly.") }