mxmbsocket/lib/Ratchet/Application/WebSocket/Version/FrameInterface.php
Chris Boden 5653f01f2f Message buffering & Refactoring
Refactored unframe() methods into Message/Frame classes (per protocol version)
Change onRecv of WebSocket App to use new interfaces to test statuses, resulting in reuniting a message fragmented by TCP
Wrote unit test covering most of new HyBi10 Frame class
2011-11-18 16:37:32 -05:00

67 lines
1.1 KiB
PHP

<?php
namespace Ratchet\Application\WebSocket\Version;
interface FrameInterface {
/**
* @alias getPayload
*/
function __toString();
/**
* Dunno if I'll use this
* Thinking could be used if a control frame?
*/
// function __invoke();
/**
* @return bool
*/
function isCoalesced();
/**
* @param string
* @todo Theoretically, there won't be a buffer overflow (end of frame + start of new frame) - but test later, return a string with overflow here
*/
function addBuffer($buf);
/**
* @return bool
*/
// function isFragment();
/**
* @return bool
*/
function isFinal();
/**
* @return bool
*/
function isMasked();
/**
* @return int
*/
function getOpcode();
/**
* @return int
*/
function getPayloadLength();
/**
* @return int
*/
// function getReceivedPayloadLength();
/**
* 32-big string
* @return string
*/
function getMaskingKey();
/**
* @param string
*/
function getPayload();
}