SimpleStickyError
└─SimpleSocket
public class SimpleSocket
extends SimpleStickyError
Constructor Summary | |
---|---|
SimpleSocket(string host, integer port, integer timeout) Opens a socket for reading and writing. |
Method Summary | |
---|---|
boolean | close() Closes the socket preventing further reads. |
string | getSent() Accessor for content so far. |
boolean | isOpen() Accessor for socket open state. |
integer | read(integer block_size) Reads data from the socket. |
boolean | write(string message) Writes some data to the socket and saves alocal copy. |
Methods inherited from SimpleTest\SimpleStickyError | |
---|---|
getError, isError |
public SimpleSocket(string host, integer port, integer timeout)
Opens a socket for reading and writing.
public boolean close()
Closes the socket preventing further reads. Cannot be reopened once closed.
public string getSent()
Accessor for content so far.
public boolean isOpen()
Accessor for socket open state.
public integer read(integer block_size)
Reads data from the socket. The error suppresion is a workaround for PHP4 always throwing a warning with a secure socket.
public boolean write(string message)
Writes some data to the socket and saves alocal copy.
Wrapper for TCP/IP socket.