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