diff 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
line wrap: on
line diff
--- a/util.h	Wed Apr 29 23:53:39 2020 -0700
+++ b/util.h	Thu Apr 30 23:15:50 2020 -0700
@@ -90,5 +90,15 @@
 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_