-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 'websocket' SockJS method which returns 426 Upgrade Required
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
namespace PHPDaemon\SockJS\Methods; | ||
|
||
use PHPDaemon\Core\Daemon; | ||
use PHPDaemon\Core\Debug; | ||
use PHPDaemon\Utils\Crypt; | ||
|
||
/** | ||
* @package Libraries | ||
* @subpackage SockJS | ||
* @author Vasily Zorin <[email protected]> | ||
*/ | ||
class Websocket extends Generic { | ||
protected $contentType = 'text/plain'; | ||
|
||
/** | ||
* Constructor | ||
* @return void | ||
*/ | ||
public function init() { | ||
$this->header('426 Upgrade Required'); | ||
$this->finish(); | ||
} | ||
|
||
/** | ||
* Called when request iterated | ||
* @return void | ||
*/ | ||
public function run() {} | ||
} |