コード例 #1
0
ファイル: SyncServer.py プロジェクト: ozelentok/ZBackup
 def bind(self):
     host = self._config['host']
     port = self._config['port']
     cert_file = self._config['cert_file']
     key_file = self._config['key_file']
     self.server_socket = Socket.ServerSocket(cert_file, key_file)
     self.server_socket.bind(host, port, 1)
     self._logger.log("Listening on {}:{}".format(host, port))
コード例 #2
0
def __main__():
    check_files_and_folders()
    socket = Socket.ServerSocket()
    connection = socket.Socket()
    sr = Server(connection, Cryptography.session_crypto(None), Registery.Registery(), Login.serverLogin(),
                Download.Download(), Upload.Upload(), List.List(), Read.Read(), Write.Write(),
                SessionKeyExchange.ServerSession(None),
                DACCommands.DACCommands(), Auditor.Auditor())
    sr.Handler()