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

  • EchoServer
  • FlashPolicy
  • IoConnection
  • IoServer
  • IpBlackList
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: namespace Ratchet\Server;
 3: use Ratchet\ConnectionInterface;
 4: use React\Socket\ConnectionInterface as ReactConn;
 5: 
 6: /**
 7:  * {@inheritdoc}
 8:  */
 9: class IoConnection implements ConnectionInterface {
10:     /**
11:      * @var \React\Socket\ConnectionInterface
12:      */
13:     protected $conn;
14: 
15: 
16:     /**
17:      * @param \React\Socket\ConnectionInterface $conn
18:      */
19:     public function __construct(ReactConn $conn) {
20:         $this->conn = $conn;
21:     }
22: 
23:     /**
24:      * {@inheritdoc}
25:      */
26:     public function send($data) {
27:         $this->conn->write($data);
28: 
29:         return $this;
30:     }
31: 
32:     /**
33:      * {@inheritdoc}
34:      */
35:     public function close() {
36:         $this->conn->end();
37:     }
38: }
39: 
Ratchet API documentation generated by ApiGen 2.8.0