comparison util.h @ 1949:5a76a7373823

Get WIP net play code compiling on Windows and cleanup some unistd.h includes
author Michael Pavone <pavone@retrodev.com>
date Thu, 30 Apr 2020 23:15:50 -0700
parents a4cae960fd08
children 441d5d6cea2f
comparison
equal deleted inserted replaced
1948:d01527615c7c 1949:5a76a7373823
88 void debug_message(char *format, ...); 88 void debug_message(char *format, ...);
89 //Disables output of info and debug messages to stdout 89 //Disables output of info and debug messages to stdout
90 void disable_stdout_messages(void); 90 void disable_stdout_messages(void);
91 //Deletes a file, returns true on success, false on failure 91 //Deletes a file, returns true on success, false on failure
92 uint8_t delete_file(char *path); 92 uint8_t delete_file(char *path);
93 //Initializes the socket library on platforms that need it
94 void socket_init(void);
95 //Sets a sockt to blocking or non-blocking mode
96 int socket_blocking(int sock, int should_block);
97 //Close a socket
98 void socket_close(int sock);
99 //Return the last error on a socket operation
100 int socket_last_error(void);
101 //Returns if the last socket error was EAGAIN/EWOULDBLOCK
102 int socket_error_is_wouldblock(void);
93 103
94 #endif //UTIL_H_ 104 #endif //UTIL_H_