diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/mkconstants.rb | 8 | ||||
-rw-r--r-- | ext/socket/socket.c | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb index dbcba25143..f2ba136f9c 100644 --- a/ext/socket/mkconstants.rb +++ b/ext/socket/mkconstants.rb @@ -275,7 +275,13 @@ result = ERB.new(<<'EOS', nil, '%').result(binding) <%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| vardef }.join("\n") %> /* - * Document-module: Socket::Constants + * Document-module: ::Socket::Constants + * + * Socket::Constants provides socket related constants. + * Following lists possible constants. + * If underlying platform doesn't define a constant, + * the corresponding Ruby constant is not defined. + * */ static void init_constants(void) diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 819c451347..b9192285c2 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1784,10 +1784,11 @@ socket_s_ip_address_list(VALUE self) * * Class +Socket+ provides access to the underlying operating system * socket implementations. It can be used to provide more operating system - * specific functionality than the protocol-specific socket classes but at the - * expense of greater complexity. In particular, the class handles addresses - * using +struct+ sockaddr structures packed into Ruby strings, which can be - * a joy to manipulate. + * specific functionality than the protocol-specific socket classes. + * + * The constants defined under Socket::Constants are also defined under Socket. + * For example, Socket::AF_INET is usable as well as Socket::Constants::AF_INET. + * See Socket::Constants for the list of constants. * * === Exception Handling * Ruby's implementation of +Socket+ causes an exception to be raised |