WebSocket Interface update
This commit is contained in:
parent
e412f574e7
commit
551888aa3c
@ -1,22 +1,20 @@
|
||||
<?php
|
||||
namespace Ratchet\Application\WebSocket;
|
||||
use Ratchet\ObserverInterface;
|
||||
use Ratchet\SocketInterface;
|
||||
use Ratchet\Application\ApplicationInterface;
|
||||
|
||||
/**
|
||||
* @todo App interfaces this (optionally) if is meant for WebSocket
|
||||
* @todo WebSocket checks if instanceof AppInterface, if so uses getSubProtocol() when doing handshake
|
||||
* @todo Pick a better name for this...
|
||||
*/
|
||||
interface AppInterface extends ObserverInterface {
|
||||
interface WebSocketAppInterface extends ApplicationInterface {
|
||||
/**
|
||||
* @param string
|
||||
*/
|
||||
function setHeaders($headers);
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
function getSubProtocol();
|
||||
|
||||
/**
|
||||
* @param Ratchet\SocketInterface
|
||||
* @param string
|
||||
* @return Ratchet\Resource\Command\CommandInterface|null
|
||||
*/
|
||||
function onOpen(SocketInterface $conn, $headers);
|
||||
}
|
Loading…
Reference in New Issue
Block a user