def unlock_ns(self, namespace): """Unlock namespace on the remote peer Parameters: namespace (string) Namespace to be unlocked, can be local or remote to the server. Returns True on success or raises an exception. """ pythonshare._send(Server_ctl("unlock", namespace), self._to_server) rv = pythonshare._recv(self._from_server) if isinstance(rv, Server_ctl_rv) and rv.status == 0: return True else: raise pythonshare.PythonShareError(rv.message)
def kill_server(self, namespace=None): """Send server shutdown message""" if namespace == None: namespace = self.namespace() pythonshare._send(Server_ctl("die", namespace), self._to_server) return True
def kill_server(self): """Send server shutdown message""" cPickle.dump(Server_ctl("die"), self._to_server) self._to_server.flush() return True