Project

General

Profile

Backport #4905 ยป add_socket.1_8.patch

ghazel (Greg Hazel), 06/19/2011 10:34 PM

View differences:

win32/win32.c (working copy)
}
#endif
int
rb_w32_add_socket(SOCKET sock, int flag)
{
return rb_w32_open_osfhandle(sock, O_RDWR|O_BINARY|O_NOINHERIT);
}
void
rb_w32_remove_socket(int fd)
{
_set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
_close(fd);
}
#undef getsockopt
static int
win32/win32.h (working copy)
size_t rb_w32_write(int, const void *, size_t);
int rb_w32_utime(const char *, struct utimbuf *);
#define Sleep(msec) (void)rb_w32_sleep(msec)
int rb_w32_add_socket(SOCKET sock, int flag);
void rb_w32_remove_socket(int fd);
/*
== ***CAUTION***
    (1-1/1)