| iMatix home page | << | < | > | >> |
![]() Version 1.91 |
#include "sflsock.h" int sock_init (void)
Initialise the internet protocol. On most systems this is a null call. On some systems this loads dynamic libraries. Returns 0 0 if everything was okay, else returns SOCKET_ERROR. You should call sock term() when your program ends.
{ #if (defined (__WINDOWS__)) WORD wVersionRequested; /* We really want Winsock 1.1 */ WSADATA wsaData; wVersionRequested = 0x0101; /* ... but we'll take 1.1 */ if (WSAStartup (wVersionRequested, &wsaData) == 0) return (0); else return ((int) SOCKET_ERROR); #elif (defined (DOES_SOCKETS)) return (0); #elif (defined (FAKE_SOCKETS)) return (0); #else connect_error_value = IP_NOSOCKETS; return ((int) SOCKET_ERROR); /* Sockets not supported */ #endif }
| << | < | > | >> |
![]() |