- Queries
- All Atoms
- Search
- Advanced Search
Diviner All Atoms
All Atoms
All Atoms
- Wraps a @{class:PhutilChannel} and implements a message-oriented protocol on top of it. A protocol channel behaves like a normal channel, except that @{method:read} and @{method:write} are message-oriented and the protocol channel handles encoding and parsing messages for transmission.
- Class
- Wait for a message, blocking until one is available.
- Method
- Decode bytes from the underlying channel into zero or more complete messages. The messages should be returned.
- Method
- Encode a message for transmission.
- Method
- Add a message to the queue. While you normally do not need to do this, you can use it to inject out-of-band messages.
- Method
- Write a message to the channel.
- Method
- Read a message from the channel, if a message is available.
- Method
- Channel on an underlying @{class:ExecFuture}. For a description of channels, see @{class:PhutilChannel}.
- Class
- If the wrapped @{class:ExecFuture} outputs data to stderr, we normally throw an exception. Instead, you can provide a callback handler that will be invoked and passed the data. It should have this signature:
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Construct an exec channel from a @{class:ExecFuture}. The future should **NOT** have been started yet (e.g., with `isReady()` or `start()`), because @{class:ExecFuture} closes stdin by default when futures start. If stdin has been closed, you will be unable to write on the channel.
- Method
- A @{class:PhutilChannelChannel} which wraps some other channel and writes data passed over it to a log file.
- Class
- Method
- Method
- Method
- Method
- Channel on an underlying stream socket or socket pair. For a description of channels, see @{class:PhutilChannel}.
- Class
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Creates a pair of socket channels that are connected to each other. This is mostly useful for writing unit tests of, e.g., protocol channels.
- Method
- Method
- Construct a socket channel from a socket or a socket pair.
- Method
- Wrapper around streams, pipes, and other things that have basic read/write I/O characteristics.
- Class
- Wait for any buffered writes to complete. This is a blocking call. When the call returns, the write buffer will be empty.
- Method
- Get the number of bytes we're currently waiting to write.
- Method
- Test state of the write buffer.
- Method
- Test state of the read buffer.
- Method
- Set the maximum size of the channel's read buffer. Reads will artificially block once the buffer reaches this size until the in-process buffer is consumed.
- Method
- Get sockets to select for writing.
- Method
- Get sockets to select for reading.
- Method
- Write to the channel's underlying I/O.
- Method
- Read from the channel's underlying I/O.
- Method
- Test if the channel is open for writing.
- Method
- Test if the channel is open for reading.
- Method
- Close the channel for writing.
- Method
- Test if the channel is open: active, can be read from and written to, etc.
- Method
- Get the channel name, as set by @{method:setName}.
- Method
- Set a channel name. This is primarily intended to allow you to debug channel code more easily, by naming channels something meaningful.
- Method
- Updates the channel, filling input buffers and flushing output buffers. Returns false if the channel has closed.
- Method
- Wait (using select()) for channels to become ready for reads or writes. This method blocks until some channel is ready to be updated.
- Method
- Wait for any activity on a list of channels. Convenience wrapper around @{method:waitForActivity}.
- Method
- Write to the channel. A channel defines what data format it accepts, so this method may take strings, objects, or anything else.
- Method
- Read from the channel. A channel defines the format of data that is read from it, so this method may return strings, objects, or anything else.
- Method
- Method
- Channel that transmits PHP objects using PHP serialization. This channel is binary safe.
- Class
- Decode a message received from the other end of the channel.
- Method
- Encode a message for transmission over the channel. The message should be any serializable PHP object. The entire object will be serialized, so avoid transmitting objects which connect to large graphs of other objects, etc.
- Method
- Channel that wraps some other channel. This class is not interesting on its own and just serves as a no-op proxy, but extending it allows you to compose channels to mutate their characteristics (for instance, to add protocol semantics with @{class:PhutilProtocolChannel}).
- Class
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Channel that transmits dictionaries of primitives using JSON serialization. This channel is not binary safe.
- Class
- Decode a message received from the other end of the channel. Messages are decoded as associative arrays.
- Method
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0