HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file net.UDPMonitor by barry
expand copy to clipboardexpand
uses UDPServer

data MonitorEvent {
	UDPServer socket
	Data userData

	bool recvReady
}

/*
{"description" : "Monitor activity over multiple non-blocking sockets."}
*/

interface UDPMonitor {
	
	/* {"@description" : "Create a new monitor instance."} */
	UDPMonitor()
	
	/* {"@description" : "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."} */
	bool addSocket(store UDPServer s, opt store Data userData)

	/* {"@description" : "Remove a socket from this monitor instance."} */
	void remSocket(UDPServer s)
	
	/* {"@description" : "Wait for activity on any of the sockets in this monitor instance."} */
	MonitorEvent[] wait(opt int ms)
	
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n net.UDPMonitor -m "reason for update" -u yourUsername
Version 2 by barry
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation