protected function _init()
{
$config = array('classes' => $this->_classes) + $this->_config;
try {
$this->connection = Libraries::instance('socket', $config['socket'], $config);
} catch (ClassNotFoundException $e) {
$this->connection = null;
}
$this->_responseTypes += array('headers' => function ($response) {
return $response->headers;
}, 'body' => function ($response) {
return $response->body();
}, 'code' => function ($response) {
return $response->status['code'];
});
}