Function
Assigns a handler routine for input coming from an open file descriptor.
Syntax
#include <dx/dx.h>
Error DXRegisterInputHandler(Error (*proc)(int, Pointer), int fd, Pointer
arg)
Functional Details
Assigns a handler routine for input coming from an open file descriptor. This function associates the routine proc with the file descriptor fd and may be used to accept input from a socket. When any input is available on fd, the routine proc is called and passed fd and arg.
The file descriptor is checked for input between module executions. Input from fd does not interrupt modules; fd is not checked for input before returning from DXRegisterInputHandler.
Calling DXRegisterInputHandler with proc=NULL unregisters the handler.
Return Value
Returns OK, or returns ERROR and sets the error code to indicate an error.
See Also
13.11 , "Asynchronous Services".