Branding
This commit is contained in:
parent
c2642e1c74
commit
45c44fb841
@ -87,7 +87,7 @@ class WAMPServerComponent implements WebSocketComponentInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$welcome = new Welcome($conn);
|
$welcome = new Welcome($conn);
|
||||||
$welcome->setWelcome($conn->WAMP->sessionId, 'Ratchet/0.1');
|
$welcome->setWelcome($conn->WAMP->sessionId, \Ratchet\Resource\VERSION);
|
||||||
$this->_msg_buffer->enqueue($welcome);
|
$this->_msg_buffer->enqueue($welcome);
|
||||||
|
|
||||||
return $this->attachStack($this->_decorating->onOpen($conn));
|
return $this->attachStack($this->_decorating->onOpen($conn));
|
||||||
|
@ -62,6 +62,7 @@ class WebSocketComponent implements MessageComponentInterface {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Do handshake, frame/unframe messages coming/going in stack
|
* Do handshake, frame/unframe messages coming/going in stack
|
||||||
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function onMessage(ConnectionInterface $from, $msg) {
|
public function onMessage(ConnectionInterface $from, $msg) {
|
||||||
if (true !== $from->WebSocket->handshake) {
|
if (true !== $from->WebSocket->handshake) {
|
||||||
@ -92,6 +93,7 @@ class WebSocketComponent implements MessageComponentInterface {
|
|||||||
if (count($agreed_protocols) > 0) {
|
if (count($agreed_protocols) > 0) {
|
||||||
$response->setHeader('Sec-WebSocket-Protocol', implode(',', $agreed_protocols));
|
$response->setHeader('Sec-WebSocket-Protocol', implode(',', $agreed_protocols));
|
||||||
}
|
}
|
||||||
|
$response->setHeader('X-Powered-By', \Ratchet\Resource\VERSION);
|
||||||
$header = (string)$response;
|
$header = (string)$response;
|
||||||
|
|
||||||
$comp = $this->_factory->newComposite();
|
$comp = $this->_factory->newComposite();
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Ratchet\Resource;
|
namespace Ratchet\Resource;
|
||||||
|
|
||||||
|
const VERSION = 'Ratchet/0.1';
|
||||||
|
|
||||||
interface ConnectionInterface {
|
interface ConnectionInterface {
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user