aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/vendor/react/socket/src/Server.php
diff options
context:
space:
mode:
authormarvin-borner@live.com2018-04-16 21:09:05 +0200
committermarvin-borner@live.com2018-04-16 21:09:05 +0200
commitcf14306c2b3f82a81f8d56669a71633b4d4b5fce (patch)
tree86700651aa180026e89a66064b0364b1e4346f3f /assets/php/vendor/react/socket/src/Server.php
parent619b01b3615458c4ed78bfaeabb6b1a47cc8ad8b (diff)
Main merge to user management system - files are now at /main/public/
Diffstat (limited to 'assets/php/vendor/react/socket/src/Server.php')
-rwxr-xr-xassets/php/vendor/react/socket/src/Server.php73
1 files changed, 0 insertions, 73 deletions
diff --git a/assets/php/vendor/react/socket/src/Server.php b/assets/php/vendor/react/socket/src/Server.php
deleted file mode 100755
index 72712e4..0000000
--- a/assets/php/vendor/react/socket/src/Server.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-namespace React\Socket;
-
-use Evenement\EventEmitter;
-use React\EventLoop\LoopInterface;
-use Exception;
-
-final class Server extends EventEmitter implements ServerInterface
-{
- private $server;
-
- public function __construct($uri, LoopInterface $loop, array $context = array())
- {
- // sanitize TCP context options if not properly wrapped
- if ($context && (!isset($context['tcp']) && !isset($context['tls']) && !isset($context['unix']))) {
- $context = array('tcp' => $context);
- }
-
- // apply default options if not explicitly given
- $context += array(
- 'tcp' => array(),
- 'tls' => array(),
- 'unix' => array()
- );
-
- $scheme = 'tcp';
- $pos = strpos($uri, '://');
- if ($pos !== false) {
- $scheme = substr($uri, 0, $pos);
- }
-
- if ($scheme === 'unix') {
- $server = new UnixServer($uri, $loop, $context['unix']);
- } else {
- $server = new TcpServer(str_replace('tls://', '', $uri), $loop, $context['tcp']);
-
- if ($scheme === 'tls') {
- $server = new SecureServer($server, $loop, $context['tls']);
- }
- }
-
- $this->server = $server;
-
- $that = $this;
- $server->on('connection', function (ConnectionInterface $conn) use ($that) {
- $that->emit('connection', array($conn));
- });
- $server->on('error', function (Exception $error) use ($that) {
- $that->emit('error', array($error));
- });
- }
-
- public function getAddress()
- {
- return $this->server->getAddress();
- }
-
- public function pause()
- {
- $this->server->pause();
- }
-
- public function resume()
- {
- $this->server->resume();
- }
-
- public function close()
- {
- $this->server->close();
- }
-}