Index Documentation

NetworkStream extends GenericStream
in package

Table of Contents

Constants

CURRENT  = SEEK_CUR
END  = SEEK_END
READABLE  = ['r', 'rb', 'r+', 'r+b', 'w+', 'w+b', 'a+', 'a+b', 'x+', 'x+b', 'c+', 'c+b']
START  = SEEK_SET
WRITEABLE  = ['r+', 'r+b', 'w', 'wb', 'w+', 'w+b', 'a', 'ab', 'a+', 'a+b', 'x', 'xb', 'x+', 'x+b', 'c', 'cb', 'c+', 'c+b']

Methods

__construct()  : mixed
__destruct()  : mixed
__toString()  : string
canRead()  : bool
canSeek()  : bool
canWrite()  : bool
close()  : void
Free, release or reset unmanaged resources.
copyTo()  : void
flush()  : void
getLength()  : int
getPosition()  : int
getResource()  : mixed
hasTimedOut()  : bool
isBlocking()  : bool
isEnded()  : bool
openAddress()  : NetworkStream
openAddressSSL()  : NetworkStream
openAddressTLS()  : NetworkStream
openEndPoint()  : NetworkStream
openEndPointSSL()  : NetworkStream
openEndPointTLS()  : NetworkStream
openHost()  : NetworkStream
openHostSSL()  : NetworkStream
openHostTLS()  : NetworkStream
openUnix()  : NetworkStream
read()  : string|null
readByte()  : int
readChar()  : string|null
readLine()  : string|null
seek()  : int
setBlocking()  : void
setLength()  : void
write()  : void
writeByte()  : void
writeChar()  : void
writeLine()  : void

Constants

CURRENT

public mixed CURRENT = SEEK_CUR

READABLE

public mixed READABLE = ['r', 'rb', 'r+', 'r+b', 'w+', 'w+b', 'a+', 'a+b', 'x+', 'x+b', 'c+', 'c+b']

START

public mixed START = SEEK_SET

WRITEABLE

public mixed WRITEABLE = ['r+', 'r+b', 'w', 'wb', 'w+', 'w+b', 'a', 'ab', 'a+', 'a+b', 'x', 'xb', 'x+', 'x+b', 'c', 'cb', 'c+', 'c+b']

Methods

__construct()

public __construct(string $hostname, int $port, float|null $timeout) : mixed
Parameters
$hostname : string
$port : int
$timeout : float|null

__destruct()

public __destruct() : mixed

__toString()

public __toString() : string
Return values
string

canRead()

public abstract canRead() : bool
Return values
bool

canSeek()

public abstract canSeek() : bool
Return values
bool

canWrite()

public abstract canWrite() : bool
Return values
bool

close()

Free, release or reset unmanaged resources.

public abstract close() : void

flush()

public abstract flush() : void

getLength()

public abstract getLength() : int
Return values
int

getPosition()

public abstract getPosition() : int
Return values
int

hasTimedOut()

public abstract hasTimedOut() : bool
Return values
bool

isBlocking()

public abstract isBlocking() : bool
Return values
bool

isEnded()

public abstract isEnded() : bool
Return values
bool

openHost()

public static openHost(string $hostname, int $port[, float|null $timeout = null ]) : NetworkStream
Parameters
$hostname : string
$port : int
$timeout : float|null = null
Return values
NetworkStream

openHostSSL()

public static openHostSSL(string $hostname, int $port[, float|null $timeout = null ]) : NetworkStream
Parameters
$hostname : string
$port : int
$timeout : float|null = null
Return values
NetworkStream

openHostTLS()

public static openHostTLS(string $hostname, int $port[, float|null $timeout = null ]) : NetworkStream
Parameters
$hostname : string
$port : int
$timeout : float|null = null
Return values
NetworkStream

read()

public abstract read(int $length) : string|null
Parameters
$length : int
Return values
string|null

readByte()

public readByte() : int
Return values
int

readChar()

public abstract readChar() : string|null
Return values
string|null

readLine()

public abstract readLine() : string|null
Return values
string|null

seek()

public abstract seek(int $offset[, int $origin = self::START ]) : int
Parameters
$offset : int
$origin : int = self::START
Return values
int

setBlocking()

public setBlocking(bool $blocking) : void
Parameters
$blocking : bool

setLength()

public abstract setLength(int $length) : void
Parameters
$length : int

write()

public abstract write(string $buffer[, int $length = -1 ]) : void
Parameters
$buffer : string
$length : int = -1

writeByte()

public writeByte(int $byte) : void
Parameters
$byte : int

writeChar()

public abstract writeChar(string $char) : void
Parameters
$char : string

writeLine()

public writeLine(string $line) : void
Parameters
$line : string

        
On this page

Search results