lithium\net\socket\Stream::write()
Implements
lithium\net\Socket::write()
writes data to the stream resource
Parameters
-
string
$data
The string to be written.
Returns
mixedFalse on error, number of bytes written otherwise.
Source
public function write($data = null) {
if (!is_resource($this->_resource)) {
return false;
}
if (!is_object($data)) {
$data = Libraries::instance(
null, 'request', (array) $data + $this->_config, $this->_classes
);
}
return fwrite($this->_resource, (string) $data, strlen((string) $data));
}