lithium\net\socket\Context::read()
Implements
lithium\net\Socket::read()
Reads from the socket. Does not apply to this implementation.
Returns
boolean|stringSource
public function read() {
if (!is_resource($this->_resource)) {
return false;
}
$meta = stream_get_meta_data($this->_resource);
if (isset($meta['wrapper_data'])) {
$headers = join("\r\n", $meta['wrapper_data']) . "\r\n\r\n";
} else {
$headers = null;
}
return $headers . stream_get_contents($this->_resource);
}