Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

security.SecureServer

Aaron Graubert edited this page Mar 24, 2017 · 3 revisions

security.SECURESERVER

The agutil.security module includes the SecureServer class, which is similar to the agutil.io.SocketServer class, but it returns SecureConnection instances instead of Socket instances.

API
  • SecureServer(port, address='', queue=3, password=None, rsabits=4096, childtimeout=3, childlogger=DummyLog) (constructor) Binds to port and accepts new connections. port, address, and queue work identically to agutil.io.SocketServer (as the SecureServer uses a SocketServer internally). password, rsabits, childtimeout, and childlogger set the password, rsabits, timeout, and logmethod arguments (respectively) to the SecureConnection constructor for each accepted connection. childlogger defaults to agutil.DummyLog (which does not log anything). childlogger may either be an agutil.Logger class, or a bound method returned by agutil.Logger.bindToSender().

  • SecureServer.accept() Waits for a connection and returns a new SecureConnection

  • SecureServer.close() Closes the underlying SocketServer