Documentation for pulsar's DEVELOPMENT version. Get the release docs here.
The pulsar.async.stream implements classes and functions for handling TCP streams.
A pulsar.SocketTransport for TCP streams.
The primary feature of a stream transport is sending bytes to a protocol and receiving bytes from the underlying protocol. Writing to the transport is done using the write() and writelines() methods. The latter method is a performance optimisation, to allow software to take advantage of specific capabilities in some transport mechanisms.
A SocketStreamTransport can be paused and resumed. Invoking this method will cause the transport to buffer data coming from protocols but not sending it to the protocol. In other words, no data will be passed to the pulsar.Protocol.data_received() method until resume() is called.
Resume the receiving end. Data received will once again be passed to the pulsar.Protocol.data_received() method.
Suspend sending data to the network until a subsequent resume_writing() call. Between pause_writing() and resume_writing() the transport’s write() method will just be accumulating data in an internal buffer.
Restart sending data to the network.
Write chunk of data to the endpoint.
Write a list (or any iterable) of data bytes to the transport.
Return True if a socket error from a read operation is muted.
This is when the socket cannot send sinse the socket has started shutting down already.
A TCP pulsar.Server.
Callable or a pulsar.ProtocolConsumer class for producing ProtocolConsumer which handle the receiving, decoding and sending of data.
Start serving the Tcp socket.
a pulsar.Deferred called back when the server is serving the socket.