1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-09-22 04:30:11 +00:00
parent 70a444b0cc
commit 8aad024e3a
11 changed files with 109 additions and 35 deletions

View file

@ -63,9 +63,13 @@ static VALUE rb_eSocket;
#ifdef SOCKS
VALUE rb_cSOCKSSocket;
#ifdef SOCKS5
#include <socks.h>
#else
void SOCKSinit();
int Rconnect();
#endif
#endif
#define INET_CLIENT 0
#define INET_SERVER 1
@ -630,12 +634,15 @@ ruby_connect(fd, sockaddr, len, socks)
#else
# define NONBLOCKING O_NONBLOCK
#endif
#endif
#ifdef SOCKS5
if (!socks)
#endif
fcntl(fd, F_SETFL, mode|NONBLOCKING);
#endif /* HAVE_FCNTL */
for (;;) {
#ifdef SOCKS
#if defined(SOCKS) && !defined(SOCKS5)
if (socks) {
status = Rconnect(fd, sockaddr, len);
}