diff options
author | Masaki Matsushita <glass.saga@gmail.com> | 2020-09-25 16:20:18 +0900 |
---|---|---|
committer | Masaki Matsushita <glass.saga@gmail.com> | 2020-12-10 20:52:29 +0900 |
commit | 78f188524f551c97b1a7a44ae13514729f1a21c7 (patch) | |
tree | eb334c023f4571b883221cbaa7a149352ac83b9c /ext/socket/rubysocket.h | |
parent | 658b4ff60934b9fb6845e214fda83229e631e366 (diff) | |
download | ruby-78f188524f551c97b1a7a44ae13514729f1a21c7.tar.gz |
Add connect_timeout to TCPSocket
Add connect_timeout to TCPSocket.new in the same way as Socket.tcp.
Closes [Feature #17187]
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r-- | ext/socket/rubysocket.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index b0e494f54e..f0e4f3a4a0 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -346,7 +346,7 @@ int rsock_socket(int domain, int type, int proto); int rsock_detect_cloexec(int fd); VALUE rsock_init_sock(VALUE sock, int fd); VALUE rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass); -VALUE rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, VALUE local_host, VALUE local_serv, int type, VALUE resolv_timeout); +VALUE rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv, VALUE local_host, VALUE local_serv, int type, VALUE resolv_timeout, VALUE connect_timeout); VALUE rsock_init_unixsock(VALUE sock, VALUE path, int server); struct rsock_send_arg { @@ -371,7 +371,7 @@ VALUE rsock_s_recvfrom_nonblock(VALUE sock, VALUE len, VALUE flg, VALUE str, VALUE ex, enum sock_recv_type from); VALUE rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from); -int rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks); +int rsock_connect(int fd, const struct sockaddr *sockaddr, int len, int socks, struct timeval *timeout); VALUE rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len); VALUE rsock_s_accept_nonblock(VALUE klass, VALUE ex, rb_io_t *fptr, |