Merge branch 'refs/heads/frag' into dev

This commit is contained in:
Chris Boden 2011-11-15 11:31:26 -05:00
commit 1e5898c92a
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,55 @@
<?php
namespace Ratchet\Protocol\WebSocket;
interface FrameInterface {
/**
* @return bool
*/
function isCoalesced();
/**
* @param string
*/
function addBuffer($buf);
/**
* @return bool
*/
function isFragment();
/**
* @return bool
*/
function isFinial();
/**
* @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();
}

View File

@ -0,0 +1,32 @@
<?php
namespace Ratchet\Protocol\WebSocket;
/**
* @todo Consider making parent interface/composite for Message/Frame with (isCoalesced, getOpcdoe, getPayloadLength, getPayload)
*/
interface MessageInterface {
/**
* @return bool
*/
function isCoalesced();
/**
* @param FragmentInterface
*/
function addFragment(FragmentInterface $fragment);
/**
* @return int
*/
function getOpcode();
/**
* @return int
*/
function getPayloadLength();
/**
* @return string
*/
function getPayload();
}