|resource||$socket||An open socket client resource||none|
Retrieve the socket identifier
Retrive info about the connected socket
Is the socket connection still valid?
Read data from the socket
If the optional size parameter is undefined the returned promise will resolve as soon as readable data is available on the socket. If a size is specified the returned pormise will not resolve until the specified number of bytes is read or the socket disconnects.
|int||$size||Optional size in bytes||null|
Read data from the socket until an end-of-line is encountered (or EOF)
All data up to and including the end-of-line character(s) is used to resolve the returned promise.
If a disconnection occurs prior to reaching the end of a line the returned promise will resolve with whatever buffered data was received. The optional limit parameter is useful in server environments where protection against malicious memory over-use by clients is needed.
|int||$limit||An option size limit in bytes||null|
Manually close the client connection
This method is not required as simply allowing the client object to be garbage collected is sufficient to unload its associated resources.
Automatically unload associated resources/watchers when garbage collected