summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-04-30 23:15:50 -0700
committerMichael Pavone <pavone@retrodev.com>2020-04-30 23:15:50 -0700
commit2b6dcd8e9058ceb6ea32a04aa1e1d4a13d682529 (patch)
treebb4eb3b1bac6f9debed1f26c4d5a5270167d5632 /util.h
parent083332cf627f720317d97c5956565834e70e28c9 (diff)
Get WIP net play code compiling on Windows and cleanup some unistd.h includes
Diffstat (limited to 'util.h')
-rw-r--r--util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.h b/util.h
index 0532fd5..014789f 100644
--- a/util.h
+++ b/util.h
@@ -90,5 +90,15 @@ void debug_message(char *format, ...);
void disable_stdout_messages(void);
//Deletes a file, returns true on success, false on failure
uint8_t delete_file(char *path);
+//Initializes the socket library on platforms that need it
+void socket_init(void);
+//Sets a sockt to blocking or non-blocking mode
+int socket_blocking(int sock, int should_block);
+//Close a socket
+void socket_close(int sock);
+//Return the last error on a socket operation
+int socket_last_error(void);
+//Returns if the last socket error was EAGAIN/EWOULDBLOCK
+int socket_error_is_wouldblock(void);
#endif //UTIL_H_