Exemple #1
0
/*
Stop accepting connections on a socket.

For a description of endpoint, see: http://api.zeromq.org/3-2:zmq-bind#toc2
*/
func (soc *Socket) Unbind(endpoint string) error {
	s := C.CString(endpoint)
	defer C.free(unsafe.Pointer(s))
	if i, err := C.zmq_unbind(soc.soc, s); int(i) != 0 {
		return errget(err)
	}
	return nil
}
Exemple #2
0
// Unbinds the socket from the specified local endpoint address.
func (s *Socket) Unbind(endpoint string) (err error) {
	cstr := C.CString(endpoint)
	defer C.free(unsafe.Pointer(cstr))
	r := C.zmq_unbind(s.sock, cstr)
	if r == -1 {
		err = zmqerr()
	}
	return
}