mxmbsocket/lib/Ratchet/SocketInterface.php
2011-10-28 15:15:23 -04:00

27 lines
566 B
PHP

<?php
namespace Ratchet;
/**
* An object-oriented container for a single socket connection
*/
interface SocketInterface {
/**
* Send text to the client on the other end of the socket
* @param string
* @param int
*/
function write($buffer, $length = 0);
/**
* Called when the client sends data to the server through the socket
* @param string
* @param int
* @param int
*/
function recv(&$buf, $len, $flags);
/**
* Close the open connection to the client/socket
*/
function close();
}