mxmbsocket/lib/Ratchet/Application/WebSocket/Version/MessageInterface.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

37 lines
652 B
PHP

<?php
namespace Ratchet\Application\WebSocket\Version;
/**
* @todo Consider making parent interface/composite for Message/Frame with (isCoalesced, getOpcdoe, getPayloadLength, getPayload)
*/
interface MessageInterface {
/**
* @alias getPayload
*/
function __toString();
/**
* @return bool
*/
function isCoalesced();
/**
* @param FragmentInterface
*/
function addFrame(FrameInterface $fragment);
/**
* @return int
*/
function getOpcode();
/**
* @return int
*/
function getPayloadLength();
/**
* @return string
*/
function getPayload();
}