Exemple #1
0
// Shutdown the socket.
// int zmq_close (void *s);
func (s *zmqSocket) Close() error {
	if C.zmq_close(s.s) != 0 {
		return errno()
	}
	s.c = nil
	return nil
}
Exemple #2
0
// If not called explicitly, the socket will be closed on garbage collection
func (soc *Socket) Close() error {
	if i, err := C.zmq_close(soc.soc); int(i) != 0 {
		return errget(err)
	}
	soc.soc = unsafe.Pointer(nil)
	return nil
}
Exemple #3
0
// Shutdown the socket.
// int zmq_close (void *s);
func (s *zmqSocket) Close() error {
	if rc, err := C.zmq_close(s.s); rc != 0 {
		return casterr(err)
	}
	s.c = nil
	return nil
}
Exemple #4
0
// Shutdown the socket.
// int zmq_close (void *s);
func (s *Socket) Close() error {
	if s.c == nil {
		return ENOTSOCK
	}
	if rc, err := C.zmq_close(s.s); rc != 0 {
		return casterr(err)
	}
	s.c = nil
	return nil
}
Exemple #5
0
// If not called explicitly, the socket will be closed on garbage collection
func (soc *Socket) Close() error {
	if soc.opened {
		soc.opened = false
		if i, err := C.zmq_close(soc.soc); int(i) != 0 {
			soc.err = errget(err)
		}
		soc.soc = unsafe.Pointer(nil)
		soc.ctx = nil
	}
	return soc.err
}
Exemple #6
0
// Closes the socket.
func (s *Socket) Close() {
	C.zmq_close(s.sock)
}
Exemple #7
0
func Close(socket ZSocket) os.Error {
	return handle(C.zmq_close(socket.Ptr))
}
Exemple #8
0
// Closes this socket
//
// Expects the executing go routine to still be locked onto an OSThread.
// May be called only once
func (p lzmqSocket) Close() os.Error {
	return p.Provider().OkIf(C.zmq_close(unsafe.Pointer(p)) == 0)
}