// Disconnect disconnects a socket from an endpoint. If returns // an error if the endpoint was not found func (s *Sock) Disconnect(endpoint string) error { rc := C.Sock_disconnect(s.zsockT, C.CString(endpoint)) if int(rc) == -1 { return ErrDisconnect } return nil }
// Disconnect disconnects a socket from an endpoint. If returns // an error if the endpoint was not found func (s *Sock) Disconnect(endpoint string) error { rc := C.Sock_disconnect(s.zsockT, C.CString(endpoint)) if int(rc) == -1 { return fmt.Errorf("endopint was not bound") } return nil }
// Disconnect disconnects a socket from an endpoint. If returns // an error if the endpoint was not found func (s *Sock) Disconnect(endpoint string) error { cEndpoint := C.CString(endpoint) defer C.free(unsafe.Pointer(cEndpoint)) rc := C.Sock_disconnect(s.zsockT, C.CString(endpoint)) if int(rc) == -1 { return ErrDisconnect } return nil }