/* Start built-in ØMQ device see: http://api.zeromq.org/2-2:zmq-device#toc2 */ func Device(device Dev, frontend, backend *Socket) error { if !(frontend.opened && backend.opened) { return ErrorSocketClosed } _, err := C.zmq_device(C.int(device), frontend.soc, backend.soc) return errget(err) }
// run a zmq_device passing messages between in and out func Device(t DeviceType, in, out *Socket) error { if rc, err := C.zmq_device(C.int(t), in.apiSocket(), out.apiSocket()); rc != 0 { return casterr(err) } return errors.New("zmq_device() returned unexpectedly.") }
// run a zmq_device passing messages between in and out func Device(t DeviceType, in, out Socket) error { if C.zmq_device(C.int(t), in.apiSocket(), out.apiSocket()) != 0 { return errno() } return errors.New("zmq_device() returned unexpectedly.") }
// Creates and runs a ZeroMQ Device. See zmq_device(3) for more details. func Device(deviceType DeviceType, frontend, backend *Socket) { C.zmq_device(C.int(deviceType), frontend.sock, backend.sock) }
/* Start built-in ØMQ device see: http://api.zeromq.org/2-2:zmq-device#toc2 */ func Device(device Dev, frontend, backend *Socket) error { _, err := C.zmq_device(C.int(device), frontend.soc, backend.soc) return errget(err) }
func Device(device int, frontend ZSocket, backend ZSocket) os.Error { return handle(C.zmq_device(C.int(device), frontend.Ptr, backend.Ptr)) }