Inject RequestVerifier into ServerNegotiator
This commit is contained in:
parent
c15e275584
commit
cc031e164b
@ -5,12 +5,15 @@ use Ratchet\ConnectionInterface;
|
|||||||
use Ratchet\Http\HttpServerInterface;
|
use Ratchet\Http\HttpServerInterface;
|
||||||
use Ratchet\Http\CloseResponseTrait;
|
use Ratchet\Http\CloseResponseTrait;
|
||||||
use Psr\Http\Message\RequestInterface;
|
use Psr\Http\Message\RequestInterface;
|
||||||
use GuzzleHttp\Psr7 as gPsr;
|
|
||||||
use Ratchet\RFC6455\Messaging\FrameInterface;
|
|
||||||
use Ratchet\RFC6455\Messaging\MessageInterface;
|
use Ratchet\RFC6455\Messaging\MessageInterface;
|
||||||
use Ratchet\RFC6455\Messaging\MessageBuffer;
|
use Ratchet\RFC6455\Messaging\FrameInterface;
|
||||||
use React\EventLoop\LoopInterface;
|
|
||||||
use Ratchet\RFC6455\Messaging\Frame;
|
use Ratchet\RFC6455\Messaging\Frame;
|
||||||
|
use Ratchet\RFC6455\Messaging\MessageBuffer;
|
||||||
|
use Ratchet\RFC6455\Messaging\CloseFrameChecker;
|
||||||
|
use Ratchet\RFC6455\Handshake\ServerNegotiator;
|
||||||
|
use Ratchet\RFC6455\Handshake\RequestVerifier;
|
||||||
|
use React\EventLoop\LoopInterface;
|
||||||
|
use GuzzleHttp\Psr7 as gPsr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The adapter to handle WebSocket requests/responses
|
* The adapter to handle WebSocket requests/responses
|
||||||
@ -60,8 +63,8 @@ class WsServer implements HttpServerInterface {
|
|||||||
$this->delegate = $component;
|
$this->delegate = $component;
|
||||||
$this->connections = new \SplObjectStorage;
|
$this->connections = new \SplObjectStorage;
|
||||||
|
|
||||||
$this->closeFrameChecker = new \Ratchet\RFC6455\Messaging\CloseFrameChecker;
|
$this->closeFrameChecker = new CloseFrameChecker;
|
||||||
$this->handshakeNegotiator = new \Ratchet\RFC6455\Handshake\ServerNegotiator;
|
$this->handshakeNegotiator = new ServerNegotiator(new RequestVerifier);
|
||||||
|
|
||||||
if ($component instanceof WsServerInterface) {
|
if ($component instanceof WsServerInterface) {
|
||||||
$this->handshakeNegotiator->setSupportedSubProtocols($component->getSubProtocols());
|
$this->handshakeNegotiator->setSupportedSubProtocols($component->getSubProtocols());
|
||||||
|
Loading…
Reference in New Issue
Block a user