Documentation

Socket
in package

Convenience wrapper around native socket and file functions to allow for mocking.

Table of Contents

Properties

$handle  : mixed

Methods

fclose()  : bool
fclose
feof()  : bool
feof
fgets()  : string
fgets
fsockopen()  : resource
fsockopen
fwrite()  : int|bool
fwrite

Properties

$handle

private mixed $handle = null

Methods

fgets()

fgets

public fgets([int $length = null ]) : string
Parameters
$length : int = null
Tags
see
http://php.net/fgets
Return values
string

fsockopen()

fsockopen

public fsockopen(string $hostname[, int $port = -1 ][, int &$errno = 0 ][, string &$errstr = '' ][, float $timeout = null ]) : resource
Parameters
$hostname : string
$port : int = -1
$errno : int = 0
$errstr : string = ''
$timeout : float = null
Tags
see
http://php.net/fsockopen
Return values
resource

fwrite()

fwrite

public fwrite(string $string[, int $length = null ]) : int|bool
Parameters
$string : string
$length : int = null
Tags
see
http://php.net/fwrite
Return values
int|bool

        
On this page

Search results