search for: sock_valid_socket

Displaying 1 result from an estimated 1 matches for "sock_valid_socket".

2004 Aug 06
0
Submission: Patch to libshout/sock.c for MacOSX
...; #endif #ifndef HAVE_SOCKLEN_T #define socklen_t int #endif #ifndef _WIN32 extern int h_errno, errno; #endif #include "sock.h" int sock_recoverable(int error) { if (error == EAGAIN || error == EINTR || error == EINPROGRESS || error == EWOULDBLOCK) { return 1; } return 0; } int sock_valid_socket(SOCKET sockfd) { return (sockfd >= 0); } #ifdef _WIN32 int inet_aton(const char *s, struct in_addr *a) { int lsb, b2, b3, msb; if (sscanf(s, "%d.%d.%d.%d", &lsb, &b2, &b3, &msb) < 4) { return 0; } #ifdef HAVE_INET_ADDR a->s_addr = inet_addr(s); if(a-&g...