add most files
This commit is contained in:
20
sys_select.h
Normal file
20
sys_select.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef SYS_SELECT_H_
|
||||
#define SYS_SELECT_H_
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
int sys_select_or_key(fd_set *mask, int msecTmo, int *key);
|
||||
/*
|
||||
wait for read event on sockets included in mask or from keyboard or a timeout
|
||||
result is negative for timeout,
|
||||
STDIN_FILENO for a key pressed,
|
||||
else socket number
|
||||
switches the terminal to no-echo no-canonical
|
||||
*/
|
||||
|
||||
void sys_keys_off(void);
|
||||
/*
|
||||
switch back terminal to normal state
|
||||
*/
|
||||
|
||||
#endif /* SYS_SELECT_H_ */
|
Reference in New Issue
Block a user