Beanstalk\Connection\Stream Interface Ref

interface Beanstalk\Connection\Stream

Class Methods

Beanstalk\Connection\Stream::close()
Description:Close the stream connection
Returns:null
Beanstalk\Connection\Stream::isTimedOut()
Description:Has the connection timed out or otherwise gone away?
Returns:boolean
Beanstalk\Connection\Stream::open($host, $port, $timeout)
Description:

Open the stream

Parameters:
  • $host (string) – Host or IP address to connect to
  • $port (integer) – Port to connect on
  • $timeout (float) – Connection timeout in milliseconds
Returns:

boolean

Beanstalk\Connection\Stream::read($bytes)
Description:

Read the next $bytes bytes from the stream

Parameters:
  • $bytes (integer) – Number of bytes to read
Returns:

string

Beanstalk\Connection\Stream::readLine()
Description:Read the next line from the stream
Returns:string
Beanstalk\Connection\Stream::write($data)
Description:

Write data to the stream

Parameters:
  • $data (string) –
Returns:

integer Number of bytes written