TYPE_SOCKET = 1
A socket buffer over TCP
SMTP buffer interface
write(string $bytes) : integer
Writes $bytes to the end of the stream.
Writing may not happen immediately if the stream chooses to buffer. If you want to write these bytes with immediate effect, call \Pop\Mail\Transport\Smtp\Stream\commit() after calling write().
This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).
Attach $is to this stream.
The stream acts as an observer, receiving all data that is written. All \Pop\Mail\Transport\Smtp\Stream\write() and \Pop\Mail\Transport\Smtp\Stream\flushBuffers() operations will be mirrored.
Remove an already bound stream.
If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.
read(integer $length) : string|boolean
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.