tcl: fileevent
fileevent or its synonym chan event is a tcl command that basically registers a callback to be executed when a particular channel (which i believe can be a file or a stream or socket) becomes either readable or writable. basically it registers an event handler that get’s executed when the specified channel can either accept or receive data.