Overview

Namespaces

  • PHPFastCGI
    • FastCGIDaemon
      • Command
      • Connection
      • ConnectionHandler
      • Exception
      • Http

Classes

  • StreamSocketConnection
  • StreamSocketConnectionPool

Interfaces

  • ConnectionInterface
  • ConnectionPoolInterface
  • Overview
  • Namespace
  • Class

Class StreamSocketConnection

The default implementation of the ConnectionInterface using stream socket resources.

PHPFastCGI\FastCGIDaemon\Connection\StreamSocketConnection implements PHPFastCGI\FastCGIDaemon\Connection\ConnectionInterface
Namespace: PHPFastCGI\FastCGIDaemon\Connection
Located at Connection/StreamSocketConnection.php
Methods summary
public
# __construct( resource $socket )

Constructor.

Constructor.

Parameters

$socket
The stream socket to wrap
protected PHPFastCGI\FastCGIDaemon\Exception\ConnectionException
# createExceptionFromLastError( string $function )

Creates a formatted exception from the last error that occurecd.

Creates a formatted exception from the last error that occurecd.

Parameters

$function
The function that failed

Returns

PHPFastCGI\FastCGIDaemon\Exception\ConnectionException
public string
# read( integer $length )

Read data from the connection.

Read data from the connection.

Parameters

$length
Number of bytes to read

Returns

string
Buffer containing the read data

Throws

PHPFastCGI\FastCGIDaemon\Exception\ConnectionException
On failure

Implementation of

PHPFastCGI\FastCGIDaemon\Connection\ConnectionInterface::read()
public
# write( string $buffer )

Write data to the connection.

Write data to the connection.

Parameters

$buffer
Buffer containing the data to write

Throws

PHPFastCGI\FastCGIDaemon\Exception\ConnectionException
On failure

Implementation of

PHPFastCGI\FastCGIDaemon\Connection\ConnectionInterface::write()
public boolean
# isClosed( )

Tests to see if the connection has been closed.

Tests to see if the connection has been closed.

Returns

boolean
True if the connection has been closed, false otherwise

Implementation of

PHPFastCGI\FastCGIDaemon\Connection\ConnectionInterface::isClosed()
public
# close( )

Closes the connection it from the pool.

Closes the connection it from the pool.

Implementation of

PHPFastCGI\FastCGIDaemon\Connection\ConnectionInterface::close()
API documentation generated by ApiGen