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

  • HttpRequestParser
  • HttpServer
  • OriginCheck
  • Router

Interfaces

  • HttpServerInterface

Traits

  • CloseResponseTrait
  • Overview
  • Namespace
  • Class
  • Tree

Class HttpRequestParser

This class receives streaming data from a client request and parses HTTP headers, returning a PSR-7 Request object once it's been buffered

Ratchet\Http\HttpRequestParser implements Ratchet\MessageInterface
Namespace: Ratchet\Http
Located at Ratchet/Http/HttpRequestParser.php
Methods summary
public Psr\Http\Message\RequestInterface
# onMessage( Ratchet\ConnectionInterface $context, string $data )

Parameters

$context
Ratchet\ConnectionInterface
$context
$data
string
$data Data stream to buffer

Returns

Psr\Http\Message\RequestInterface

Throws

OverflowException
If the message buffer has become too large

Implementation of

Ratchet\MessageInterface::onMessage()
public boolean
# isEom( string $message )

Determine if the message has been buffered as per the HTTP specification

Determine if the message has been buffered as per the HTTP specification

Parameters

$message
string
$message

Returns

boolean
public Psr\Http\Message\RequestInterface
# parse( string $headers )

Parameters

$headers
string
$headers

Returns

Psr\Http\Message\RequestInterface
Constants summary
string EOM "\r\n\r\n"
#
Properties summary
public integer $maxSize 4096
#

The maximum number of bytes the request can be This is a security measure to prevent attacks

The maximum number of bytes the request can be This is a security measure to prevent attacks

Ratchet API documentation generated by ApiGen 2.8.0