angelos.net.mail¶
Mail handler.
-
exception
angelos.net.mail.
BlockError
¶ Bases:
RuntimeWarning
Block data digest mismatch.
-
class
angelos.net.mail.
BlockPacket
(*args)¶ Bases:
angelos.net.base.Packet
Response to mail collect request.
-
class
angelos.net.mail.
ClientCollectStateMachine
¶ Bases:
angelos.net.base.WaypointState
Mail collection state client-side.
-
property
event
¶ Expose event.
-
property
-
class
angelos.net.mail.
ClientPullStateMachine
¶ Bases:
angelos.net.base.WaypointState
Mail collection state client-side.
-
property
event
¶ Expose event.
-
property
-
class
angelos.net.mail.
CollectPacket
(*args)¶ Bases:
angelos.net.base.Packet
Request to collect a mail from server.
-
class
angelos.net.mail.
DispatchNotePacket
(*args)¶ Bases:
angelos.net.base.Packet
Response to mail collect request.
-
class
angelos.net.mail.
DownloadSession
(server: bool, session: int, file: uuid.UUID, count: int = 0)¶ Bases:
angelos.net.base.ProtocolSession
-
property
pull
¶ Exposing the internal collection state.
-
property
-
class
angelos.net.mail.
MailClient
(manager: Protocol)¶ Bases:
angelos.net.mail.MailHandler
Client side mail handler.
-
collect_iter
(sesh: angelos.net.mail.ReceiveSession)¶ Iterator for collecting mails from server.
-
pull_iter
(sesh: angelos.net.mail.DownloadSession)¶ Iterator for pulling file stream blocks from server.
-
start
() → bool¶ Make authentication against server.
-
-
exception
angelos.net.mail.
MailError
¶ Bases:
RuntimeError
Unrepairable errors in the mail handler.
-
FD_ALREADY_OPEN
= ('File descriptor already open', 101)¶
-
INIT_FAILED
= ('Initialization if protocol failed', 100)¶
-
NOT_AUTHENTICATED
= ('The client is not authenticated', 103)¶
-
STREAM_UNSYNCED
= ('Stream block index out of sync.', 102)¶
-
-
class
angelos.net.mail.
MailHandler
(manager: Protocol)¶ Bases:
angelos.net.base.Handler
Base handler for mail.
-
LEVEL
= 2¶
-
PACKETS
= {1: <class 'angelos.net.mail.CollectPacket'>, 2: <class 'angelos.net.mail.DispatchNotePacket'>, 3: <class 'angelos.net.mail.PullPacket'>, 4: <class 'angelos.net.mail.BlockPacket'>, 115: <class 'angelos.net.base.EnquiryPacket'>, 116: <class 'angelos.net.base.ResponsePacket'>, 117: <class 'angelos.net.base.TellPacket'>, 118: <class 'angelos.net.base.ShowPacket'>, 119: <class 'angelos.net.base.ConfirmPacket'>, 120: <class 'angelos.net.base.StartPacket'>, 121: <class 'angelos.net.base.FinishPacket'>, 122: <class 'angelos.net.base.AcceptPacket'>, 123: <class 'angelos.net.base.RefusePacket'>, 124: <class 'angelos.net.base.BusyPacket'>, 125: <class 'angelos.net.base.DonePacket'>, 126: <class 'angelos.net.base.UnknownPacket'>, 127: <class 'angelos.net.base.ErrorPacket'>}¶
-
PKT_BLOCK
= 4¶
-
PKT_COLLECT
= 1¶
-
PKT_DISPATCH
= 2¶
-
PKT_PULL
= 3¶
-
RANGE
= 3¶
-
SESH_DOWNLOAD
= 3¶
-
SESH_RECEIVE
= 1¶
-
SESH_SEND
= 2¶
-
SESH_UPLOAD
= 4¶
-
ST_VERSION
= 1¶
-
process_block
(packet: angelos.net.mail.BlockPacket)¶ Process request to show state.
-
process_collect
(packet: angelos.net.mail.CollectPacket)¶ Process mail collection request.
-
process_dispatch_note
(packet: angelos.net.mail.DispatchNotePacket)¶ Process request to show state.
-
process_pull
(packet: angelos.net.mail.PullPacket)¶ Process request to show state.
-
-
class
angelos.net.mail.
MailServer
(manager: Protocol)¶ Bases:
angelos.net.mail.MailHandler
Server side mail handler.
-
session_prepare
(sesh: angelos.net.base.ProtocolSession)¶ Call to make preparations for a session.
-
-
class
angelos.net.mail.
PullPacket
(*args)¶ Bases:
angelos.net.base.Packet
Request to collect a block from server.
-
class
angelos.net.mail.
ReceiveSession
(server: bool, session: int)¶ Bases:
angelos.net.base.ProtocolSession
-
property
collection
¶ Exposing the internal collection state.
-
property
-
class
angelos.net.mail.
SendSession
(server: bool, session: int)¶
-
class
angelos.net.mail.
ServerCollectStateMachine
¶ Bases:
angelos.net.base.WaypointState
Mail collection state server-side.
-
class
angelos.net.mail.
ServerPullStateMachine
¶ Bases:
angelos.net.base.WaypointState
Mail collection state server-side.
-
class
angelos.net.mail.
UploadSession
(server: bool, session: int, file: uuid.UUID = UUID('00000000-0000-0000-0000-000000000000'), count: int = 0)¶