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

  • AbstractConnectionDecorator
  • App

Interfaces

  • ComponentInterface
  • ConnectionInterface
  • MessageComponentInterface
  • MessageInterface

Constants

  • VERSION
  • Overview
  • Namespace
  • Class
  • Tree

Interface ComponentInterface

This is the interface to build a Ratchet application with. It implements the decorator pattern to build an application stack

Direct known implementers

Ratchet\MessageComponentInterface, Ratchet\Wamp\WampServerInterface, Ratchet\WebSocket\MessageComponentInterface

Indirect known implementers

Ratchet\Http\HttpServer, Ratchet\Http\HttpServerInterface, Ratchet\Wamp\WampServer, Ratchet\WebSocket\WsServer, Ratchet\Http\OriginCheck, Ratchet\Http\Router, Ratchet\Server\EchoServer, Ratchet\Server\FlashPolicy, Ratchet\Server\IpBlackList, Ratchet\Session\SessionProvider, Ratchet\Wamp\ServerProtocol, Ratchet\Wamp\TopicManager
Namespace: Ratchet
Located at Ratchet/ComponentInterface.php
Methods summary
public
# onOpen( Ratchet\ConnectionInterface $conn )

When a new connection is opened it will be passed to this method

When a new connection is opened it will be passed to this method

Parameters

$conn
Ratchet\ConnectionInterface
$conn The socket/connection that just connected to your application

Throws

Exception
public
# onClose( Ratchet\ConnectionInterface $conn )

This is called before or after a socket is closed (depends on how it's closed). SendMessage to $conn will not result in an error if it has already been closed.

This is called before or after a socket is closed (depends on how it's closed). SendMessage to $conn will not result in an error if it has already been closed.

Parameters

$conn
Ratchet\ConnectionInterface
$conn The socket/connection that is closing/closed

Throws

Exception
public
# onError( Ratchet\ConnectionInterface $conn, Exception $e )

If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method

If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method

Parameters

$conn
Ratchet\ConnectionInterface
$conn
$e
Exception
$e

Throws

Exception
Ratchet API documentation generated by ApiGen 2.8.0