Class Socket
Convenience wrapper around native socket and file functions to allow for
mocking.
Methods summary
public
resource
|
#
fsockopen( string $hostname, integer $port = -1, integer & $errno = 0, string & $errstr = '', float $timeout = null )
fsockopen
Parameters
- $hostname
- $port
- $errno
- $errstr
- $timeout
Returns
resource
See
https://php.net/fsockopen
|
public
integer
|
#
fwrite( string $string, integer $length = null )
fwrite
Parameters
Returns
integer | bool
See
https://php.net/fwrite
|
public
string
|
#
fgets( integer $length = null )
fgets
Parameters
Returns
string
See
https://php.net/fgets
|
public
boolean
|
#
feof( )
feof
Returns
boolean
See
https://php.net/feof
|
public
boolean
|
#
fclose( )
fclose
Returns
boolean
See
https://php.net/fclose
|