A message receiver which adds a header and delivers a message to a file whose name includes the size of the message.

Instance Variable size The number of octets in the message. (type: int)
Method __init__
Method lineReceived Write a line to the file.
Method eomReceived At the end of message, rename the file holding the message to its final name concatenated with the size of the file.

Inherited from FileMessage:

Instance Variable fp See __init__.
Instance Variable name See __init__.
Instance Variable finalName See __init__.
Method connectionLost Delete the file holding the partially received message.
size =
The number of octets in the message. (type: int)
def __init__(self, address, fp, *a, **kw): (source)
ParametersaddressThe address of the message recipient. (type: bytes)
fpThe file in which to store the message while it is being received. (type: file-like object)
aPositional arguments for FileMessage.__init__. (type: 2-tuple of (0) bytes, (1) bytes)
kwKeyword arguments for FileMessage.__init__. (type: dict)
def lineReceived(self, line): (source)

Write a line to the file.

ParameterslineA received line. (type: bytes)
def eomReceived(self): (source)

At the end of message, rename the file holding the message to its final name concatenated with the size of the file.

ReturnsA deferred which returns the name of the file holding the message. (type: Deferred which successfully results in bytes)
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.