Beanstalk\Connection\Stream\
Socket
¶Implements: | BeanstalkConnectionStream |
---|---|
Description: | Connection stream using PHP native sockets |
Author: | Joshua Dechant <jdechant@shapeup.com> |
Class Methods
Socket::close
– Close the stream connectionSocket::isTimedOut
– Has the connection timed out or otherwise gone away?Socket::open
– Open the streamSocket::read
– Read the next $bytes bytes from the streamSocket::readLine
– Read the next line from the streamSocket::write
– Write data to the streamBeanstalk\Connection\Stream\Socket::
close
()¶Description: | Close the stream connection |
---|---|
Returns: | null |
Beanstalk\Connection\Stream\Socket::
isTimedOut
()¶Description: | Has the connection timed out or otherwise gone away? |
---|---|
Returns: | boolean |
Beanstalk\Connection\Stream\Socket::
open
($host, $port, $timeout)¶Description: | Open the stream |
---|---|
Parameters: |
|
Returns: | boolean |
Beanstalk\Connection\Stream\Socket::
read
($bytes)¶Description: | Read the next $bytes bytes from the stream |
---|---|
Parameters: |
|
Returns: | string |
Beanstalk\Connection\Stream\Socket::
readLine
()¶Description: | Read the next line from the stream |
---|---|
Returns: | string |
Beanstalk\Connection\Stream\Socket::
write
($data)¶Description: | Write data to the stream |
---|---|
Parameters: |
|
Returns: | integer Number of bytes written |