コード例 #1
0
    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)
コード例 #2
0
 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
コード例 #3
0
ファイル: client.py プロジェクト: flaaflaa/fMBT
 def kill_server(self):
     """Send server shutdown message"""
     cPickle.dump(Server_ctl("die"), self._to_server)
     self._to_server.flush()
     return True