
A bunch of API updates Added read() to SocketInterface Return self for fluid interface in Server
22 lines
526 B
PHP
22 lines
526 B
PHP
<?php
|
|
namespace Ratchet\Application\WebSocket\Command\Action;
|
|
use Ratchet\Resource\Command\Action\SendMessage;
|
|
use Ratchet\Application\ApplicationInterface;
|
|
|
|
/**
|
|
* Not yet implemented/completed
|
|
*/
|
|
class Disconnect extends SendMessage {
|
|
protected $_code = 1000;
|
|
|
|
public function setStatusCode($code) {
|
|
$this->_code = (int)$code;
|
|
|
|
// re-do message based on code
|
|
}
|
|
|
|
public function execute(ApplicationInterface $scope = null) {
|
|
parent::execute();
|
|
$this->_socket->close();
|
|
}
|
|
} |