summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/lib/socket.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index d7bd760729..8898b51b47 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -29,7 +29,13 @@ class Addrinfo
end
end
- def connect_internal(local_addrinfo)
+ # creates a new Socket connected to the address of +local_addrinfo+.
+ #
+ # If no arguments are given, the address of the socket is not bound.
+ #
+ # If a block is given the created socket is yielded for each address.
+ #
+ def connect_internal(local_addrinfo) # :yields: socket
sock = Socket.new(self.pfamily, self.socktype, self.protocol)
begin
sock.ipv6only! if self.ipv6?