summaryrefslogtreecommitdiff
path: root/ext/socket/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/init.c')
-rw-r--r--ext/socket/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 1859777e9ea..a21c7300300 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -333,6 +333,15 @@ connect_blocking(void *data)
return (VALUE)connect(arg->fd, arg->sockaddr, arg->len);
}
+#if defined(SOCKS) && !defined(SOCKS5)
+static VALUE
+socks_connect_blocking(void *data)
+{
+ struct connect_arg *arg = data;
+ return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len);
+}
+#endif
+
int
ruby_connect(int fd, const struct sockaddr *sockaddr, int len, int socks)
{