search for: sock_block

Displaying 2 results from an estimated 2 matches for "sock_block".

2004 Aug 06
0
Submission: Patch to libshout/sock.c for MacOSX
...et_blocking(SOCKET sockfd, const int block) { #ifdef _WIN32 int varblock = block; #endif if ((!sock_valid_socket(sockfd)) || (block < 0) || (block > 1)) return SOCKET_ERROR; #ifdef _WIN32 return ioctlsocket(sockfd, FIONBIO, &varblock); #else return fcntl(sockfd, F_SETFL, (block == SOCK_BLOCK) ? 0 : O_NONBLOCK); #endif } int sock_close(SOCKET sockfd) { #ifdef _WIN32 return closesocket(sockfd); #else return close(sockfd); #endif } /* * Write len bytes from buf to the socket. */ int sock_write_bytes(SOCKET sockfd, const char *buff, const int len) { int wrote, res, polled; // struc...
2004 Aug 06
2
ICECAST enseirb group
...inc. Can this be improved or > > is there anything we didn't understood or saw ? > > > > ---------------------------------------- > > > > In _handle_connecion(), after stats_event_inc(NULL, "connections"); we make > > sock_set_blocking(con->sock, SOCK_BLOCK); and then use > > util_read_header(con->sock, header, 4096) in order to read the header of the > > request send by the client. Why putting the socket in SOCK_BLOCK mode ? Why > > receiving data from the socket byte per byte ? We know there can be > > something behind the...