Changeset 701acdd4 for sock.h


Ignore:
Timestamp:
2005-12-16T17:58:00Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
12c6634, 4bfca70
Parents:
c4168f4
Message:

Non-blocking SSL handshakes for GnuTLS. The rest might come later, but is
slightly less important.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sock.h

    rc4168f4 r701acdd4  
    66#include <netdb.h>
    77#define sock_make_nonblocking(fd) fcntl(fd, F_SETFL, O_NONBLOCK)
     8#define sock_make_blocking(fd) fcntl(fd, F_SETFL, 0)
    89#define sockerr_again() (errno == EINPROGRESS || errno == EINTR)
    910#define closesocket(a) close(a)
     
    2223# define mode_t int
    2324# define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); }
     25# define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); }
    2426# define sockerr_again() (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK)
    2527# define ETIMEDOUT WSAETIMEDOUT
Note: See TracChangeset for help on using the changeset viewer.