|
@@ 215-219 (lines=5) @@
|
| 212 |
|
*/ |
| 213 |
|
public function handshake() { |
| 214 |
|
$this->route = $this->pool->getRoute($this->server['DOCUMENT_URI'], $this); |
| 215 |
|
if (!$this->route) { |
| 216 |
|
Daemon::$process->log(get_class($this) . '::' . __METHOD__ . ' : Cannot handshake session for client "' . $this->addr . '"'); |
| 217 |
|
$this->finish(); |
| 218 |
|
return false; |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
if (method_exists($this->route, 'onBeforeHandshake')) { |
| 222 |
|
$this->route->onWakeup(); |
|
@@ 243-247 (lines=5) @@
|
| 240 |
|
} |
| 241 |
|
} |
| 242 |
|
|
| 243 |
|
if (!$this->sendHandshakeReply($extraHeaders)) { |
| 244 |
|
Daemon::$process->log(get_class($this) . '::' . __METHOD__ . ' : Handshake protocol failure for client "' . $this->addr . '"'); |
| 245 |
|
$this->finish(); |
| 246 |
|
return false; |
| 247 |
|
} |
| 248 |
|
|
| 249 |
|
$this->handshaked = true; |
| 250 |
|
$this->headers_sent = true; |