|
@@ 129-132 (lines=4) @@
|
| 126 |
|
$this->socket_port |
| 127 |
|
); |
| 128 |
|
|
| 129 |
|
if ( $bind === false ) { |
| 130 |
|
$error = self::getSocketError($this->socket); |
| 131 |
|
throw new SocketException("Cannot bind socket: $error"); |
| 132 |
|
} |
| 133 |
|
|
| 134 |
|
socket_set_nonblock($this->socket); |
| 135 |
|
|
|
@@ 154-157 (lines=4) @@
|
| 151 |
|
|
| 152 |
|
$listen = socket_listen($this->socket); |
| 153 |
|
|
| 154 |
|
if ( $listen === false ) { |
| 155 |
|
$error = self::getSocketError($this->socket); |
| 156 |
|
throw new SocketException("Cannot put socket in listening mode: $error"); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
$this->logger->debug("Socket listening on ".$this->handler); |
| 160 |
|
|