serve: Refactor some socket utility code into its own module.

We'll be using this in proxy mode later
This commit is contained in:
nick
2013-02-13 13:43:52 +00:00
parent 0fcbe04f80
commit ac560bd907
5 changed files with 158 additions and 101 deletions

View File

@@ -148,7 +148,7 @@ void mylog(int line_level, const char* format, ...);
#define NULLCHECK(value) FATAL_IF_NULL(value, "BUG: " #value " is null")
#define SHOW_ERRNO( msg ) msg ": %s (%i)", ( errno == 0 ? "EOF" : strerror(errno) ), errno
#define SHOW_ERRNO( msg, ... ) msg ": %s (%i)", ##__VA_ARGS__, ( errno == 0 ? "EOF" : strerror(errno) ), errno
#endif