diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-12-18 08:49:06 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-12-18 08:49:06 +0900 |
commit | 0601bce6fc57cef5ae22a944b15b8e9fca1ef6ef (patch) | |
tree | d352a1f12c086a8d24f74b098d9e02df8000b258 /ext/socket | |
parent | 71c4a9c38f67dd393d64b4f68110b742a59cf082 (diff) |
[DOC] Add Socket::ResolutionError documentation
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c index 15b639f400..dd1158e19d 100644 --- a/ext/socket/init.c +++ b/ext/socket/init.c @@ -778,6 +778,12 @@ rsock_getfamily(rb_io_t *fptr) return ss.addr.sa_family; } +/* + * call-seq: + * error_code -> integer + * + * Returns the raw error code occurred at name resolution. + */ static VALUE sock_resolv_error_code(VALUE self) { @@ -791,6 +797,9 @@ rsock_init_socket_init(void) * SocketError is the error class for socket. */ rb_eSocket = rb_define_class("SocketError", rb_eStandardError); + /* + * ResolutionError is the error class for socket name resolution. + */ rb_eResolution = rb_define_class_under(rb_cSocket, "ResolutionError", rb_eSocket); rb_define_method(rb_eResolution, "error_code", sock_resolv_error_code, 0); rsock_init_ipsocket(); |