private function startConnection()
{
if ($this->socket !== null) {
return false;
}
$socket = null;
$ex = null;
try {
switch ($this->type) {
case Channel::CONNECTOR:
$socket = $this->createConnector();
break;
case Channel::BINDER:
$socket = $this->createBinder();
break;
default:
return false;
}
} catch (Error $ex) {
} catch (Exception $ex) {
}
if ($ex !== null) {
return false;
}
$this->socket = $socket;
return true;
}