lithium\net\Socket::send()
Aggregates read and write methods into a coherent request response
Parameters
-
\lithium\net\Message
$message
-
array
$options
- '
response
': a fully-namespaced string for the response object
- '
Returns
objecta response object based on \lithium\net\Message
Source
public function send($message = null, array $options = []) {
$defaults = ['response' => $this->_classes['response']];
$options += $defaults;
if ($this->write($message)) {
$config = ['message' => $this->read()] + $this->_config;
return $this->_instance($options['response'], $config);
}
}