Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function handshake(RequestInterface $request)
 {
     if (true !== $this->_verifier->verifyAll($request)) {
         return new Response(400);
     }
     return new Response(101, array('Upgrade' => 'websocket', 'Connection' => 'Upgrade', 'Sec-WebSocket-Accept' => $this->sign($request->getHeader('Sec-WebSocket-Key'))));
 }
Пример #2
0
 /**
  * @dataProvider versionProvider
  */
 public function testVersionEquals13($expected, $in)
 {
     $this->assertEquals($expected, $this->_v->verifyVersion($in));
 }