mxmbsocket/lib/Ratchet/Application/WebSocket/Version/VersionInterface.php
Chris Boden 923b936e42 Refactoring
Removed WebSocket unframing code that was refactored in previous commits
Added ability to configure buffer size on socket server
2011-11-19 17:18:48 -05:00

33 lines
906 B
PHP

<?php
namespace Ratchet\Application\WebSocket\Version;
/**
* Despite the version iterations of WebInterface the actions they go through are similar
* This standardizes how the server handles communication with each protocol version
* @todo Need better naming conventions...newMessage and newFrame are for reading incoming framed messages (action is unframing)
* The current method names suggest you could create a new message/frame to send, which they can not do
*/
interface VersionInterface {
/**
* Perform the handshake and return the response headers
* @param string
* @return array|string
*/
function handshake($message);
/**
* @return MessageInterface
*/
function newMessage();
/**
* @return FrameInterface
*/
function newFrame();
/**
* @param string
* @return string
*/
function frame($message);
}