mxmbsocket/lib/Ratchet/Application/WebSocket/Version/FrameInterface.php
Chris Boden 02ffd6f782 Interface change
Changed onRecv to onMessage in Interface to match a standard api
Removed Frame::__toString methods - could imply different return expectation
2011-11-20 14:53:13 -05:00

62 lines
1.0 KiB
PHP

<?php
namespace Ratchet\Application\WebSocket\Version;
interface FrameInterface {
/**
* 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();
}