Compile multiple network backends into the binary and choose which one to use at runtime.

This makes it possible to share more code between the backends and also work around
bugs of certain backends on some (versions of) operating systems.
This commit is contained in:
Jan Vidar Krey
2010-02-10 21:57:27 +01:00
parent 6ac78e1a10
commit 896bbfcb5d
9 changed files with 446 additions and 382 deletions

View File

@@ -47,7 +47,13 @@ int net_initialize()
}
#endif /* WINSOCK */
net_backend_initialize();
if (!net_backend_init())
{
#ifdef WINSOCK
WSACleanup();
#endif
return -1;
}
net_stats_initialize();
#ifdef SSL_SUPPORT