# SocketOutputStream Class Reference
[Various accompanying utilities]

Inheritance diagram for SocketOutputStream:
[legend]

List of all members.

## Public Member Functions

| __construct (Socket $socket)
| write ($buffer)

## Public Attributes

const | WRITE_ATTEMPTS = 15
| NOTE: if socket timeout is 1 second, we can block here over abt 15 seconds.

## Private Attributes

| $socket = null

## Detailed Description

Definition at line 15 of file SocketOutputStream.class.php.

## Constructor & Destructor Documentation

SocketOutputStream::__construct | ( | Socket $ | socket | ) |

Definition at line 30 of file SocketOutputStream.class.php.

## Member Function Documentation

SocketOutputStream::write | ( | $ | buffer | ) |

Returns:
  SocketOutputStream

Reimplemented from OutputStream.

Definition at line 38 of file SocketOutputStream.class.php.

## Member Data Documentation

SocketOutputStream::$socket = null`[private]`

Definition at line 28 of file SocketOutputStream.class.php.

const SocketOutputStream::WRITE_ATTEMPTS = 15

NOTE: if socket timeout is 1 second, we can block here over abt 15 seconds.

See conventions of OutputStream.

You must set reliable timeout for socket operations if you want to avoid fatal error on max_execution_time and you must make sure the buffer is not too large to send it at once to your physical channel.

Definition at line 26 of file SocketOutputStream.class.php.

The documentation for this class was generated from the following file:

- main/Utils/IO/SocketOutputStream.class.php