\Swift_Transport_IoBuffer
Buffers input and output to a resource.
- Author: Chris Corbyn
Synopsis
interface Swift_Transport_IoBuffer
extends Swift_InputByteStream, Swift_OutputByteStream
{
- // constants
- const TYPE_SOCKET = 0x0001;
- const TYPE_PROCESS = 0x0010;
- // methods
- public void initialize()
- public void setParam()
- public void terminate()
- public void setWriteTranslations()
- public string readLine()
- // Inherited methods from Swift_InputByteStream
- public integer write()
- public void commit()
- public void bind()
- public void unbind()
- public void flushBuffers()
- // Inherited methods from Swift_OutputByteStream
- public string|boolean read()
- public boolean setReadPointer()
Hierarchy
Constants
Name | Value |
---|---|
TYPE_SOCKET | 0x0001 |
TYPE_PROCESS | 0x0010 |
Methods
public
- initialize() — Perform any initialization needed, using the given $params.
- readLine() — Get a line of output (including any CRLF).
- setParam() — Set an individual param on the buffer (e.g. switching to SSL).
- setWriteTranslations() — Set an array of string replacements which should be made on data written to the buffer.
- terminate() — Perform any shutdown logic needed.
Inherited from Swift_InputByteStream
public
- bind() — Attach $is to this stream.
- commit() — For any bytes that are currently buffered inside the stream, force them off the buffer.
- flushBuffers() — Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
- unbind() — Remove an already bound stream.
- write() — Writes $bytes to the end of the stream.
Inherited from Swift_OutputByteStream
public
- read() — Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
- setReadPointer() — Move the internal read pointer to $byteOffset in the stream.