mxmbsocket/src/Ratchet/WebSocket/WsConnection.php
Chris Boden 4735218aa0 [BCB] Namespace changes
Removed the `Component` namespace
Removed the `Resource` namespace
Renamed components:
`IOServerComponent` => `IoServer`
`WebSocketComponent` => `WsServer`
`SessionComponent` => `SessionProvider`
`WAMPServerComponent` => `WampServer`
`IpBlackListComponent` => `IpBlackList`
`FlashPolicyComponent` => `FlashPolicy`
2012-05-08 23:14:28 -04:00

32 lines
584 B
PHP

<?php
namespace Ratchet\WebSocket;
use Ratchet\AbstractConnectionDecorator;
/**
* @property stdClass $WebSocket
*/
class WsConnection extends AbstractConnectionDecorator {
public function send($data) {
// need frame caching
$data = $this->WebSocket->version->frame($data, false);
$this->getConnection()->send($data);
}
public function close() {
// send close frame
// ???
// profit
$this->getConnection()->close(); // temporary
}
public function ping() {
}
public function pong() {
}
}