Overview

Namespaces

  • Evenement
  • None
  • PHP
  • Psr
    • Http
      • Message
  • Ratchet
    • Http
    • RFC6455
      • Handshake
      • Messaging
    • Server
    • Session
      • Serialize
      • Storage
        • Proxy
    • Wamp
    • WebSocket
  • React
    • EventLoop
      • Tick
      • Timer
    • Socket
    • Stream
  • Symfony
    • Component
      • HttpFoundation
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
      • Routing
        • Annotation
        • Exception
        • Generator
          • Dumper
        • Loader
          • DependencyInjection
        • Matcher
          • Dumper
        • Tests
          • Annotation
          • Fixtures
            • AnnotatedClasses
            • OtherAnnotatedClasses
          • Generator
            • Dumper
          • Loader
          • Matcher
            • Dumper

Classes

  • Connector
  • DnsConnector
  • LimitingServer
  • SecureConnector
  • SecureServer
  • Server
  • TcpConnector
  • TimeoutConnector
  • UnixConnector

Interfaces

  • ConnectionInterface
  • ConnectorInterface
  • ServerInterface
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace React\Socket;
 4: 
 5: use React\Socket\ConnectorInterface;
 6: use React\EventLoop\LoopInterface;
 7: use React\Promise\Timer;
 8: 
 9: final class TimeoutConnector implements ConnectorInterface
10: {
11:     private $connector;
12:     private $timeout;
13:     private $loop;
14: 
15:     public function __construct(ConnectorInterface $connector, $timeout, LoopInterface $loop)
16:     {
17:         $this->connector = $connector;
18:         $this->timeout = $timeout;
19:         $this->loop = $loop;
20:     }
21: 
22:     public function connect($uri)
23:     {
24:         return Timer\timeout($this->connector->connect($uri), $this->timeout, $this->loop);
25:     }
26: }
27: 
Ratchet API documentation generated by ApiGen 2.8.0