Interface TCPMonitor
access this type via: net.TCPMonitor (provides, requires or uses)
Monitor activity over multiple non-blocking sockets.
Functions
TCPMonitor()
bool addSocket(storeTCPSocket s, optional storeData userData)
void armSendNotify(TCPSocket s)
void remSocket(TCPSocket s)
MonitorEvent[] wait(optional int ms)
TCPMonitor()
Create a new monitor instance.
bool addSocket(storeTCPSocket s, optional storeData userData)
Add a socket to this monitor instance, optionally associating a data instance with it. The monitor will deliver recv and close events by default, indicating that the socket has data available for receive or that it has been closed.
void armSendNotify(TCPSocket s)
Subscribe for a monitor notification, via wait(), when this socket is next ready for send use. A send-ready notification is only delivered once when the socket first becomes ready; for another notification the user must call this function again.
void remSocket(TCPSocket s)
Remove a socket from this monitor instance.
MonitorEvent[] wait(optional int ms)
Wait for activity on any of the sockets in this monitor instance.