StreamInterface
interface StreamInterface (View source)
Methods
bool
open(string $transport, string $host, int $port, int $timeout, array $options = [])
Open the underlying stream.
void
close()
Close the underlying stream.
string|false
read(int $length)
Read data from the stream.
string|false
fgets()
Read a single line from the stream.
int|false
fwrite(string $data)
Write data to the stream.
array
meta()
Return meta info (like stream_get_meta_data).
bool
opened()
Determine if the stream is open.
bool
setTimeout(int $seconds)
Set the timeout on the stream.
bool|int
setSocketSetCrypto(bool $enabled, int|null $method)
Set encryption state on an already connected socked.
Details
bool
open(string $transport, string $host, int $port, int $timeout, array $options = [])
Open the underlying stream.
void
close()
Close the underlying stream.
string|false
read(int $length)
Read data from the stream.
string|false
fgets()
Read a single line from the stream.
int|false
fwrite(string $data)
Write data to the stream.
array
meta()
Return meta info (like stream_get_meta_data).
bool
opened()
Determine if the stream is open.
bool
setTimeout(int $seconds)
Set the timeout on the stream.
bool|int
setSocketSetCrypto(bool $enabled, int|null $method)
Set encryption state on an already connected socked.