Proper detection whether SCTP is available. Do not update player names on configuration change if network client is running.

This commit is contained in:
lotodore committed 2007-06-04 16:19:11 +00:00
1 parent ffbe8ac924
commit b9ccba6ed4
8 files changed
+37 -15

No files matched your search

+19
View File
@@ -22,6 +22,10 @@
#include <net/socket_startup.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
bool
socket_startup()
{
@@ -33,3 +37,18 @@ socket_cleanup()
{
}
bool
socket_has_sctp()
{
#ifdef IPPROTO_SCTP
int test = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
if (test == -1)
return false;
close(test);
return true;
#else
return false;
#endif
}