Set protocol of AddrInfo
MODIFY
mrbgems/mruby-socket/src/socket.c
mrbgems/mruby-socket/src/socket.c
@@ -146,6 +146,10 @@ mrb_addrinfo_getaddrinfo(mrb_state *mrb, mrb_value klass)
hints.ai_socktype = (int)mrb_fixnum(socktype);
}
+ if (mrb_fixnum_p(protocol)) {
+ hints.ai_protocol = (int)mrb_fixnum(protocol);
+ }
+
lastai = mrb_cv_get(mrb, klass, mrb_intern_lit(mrb, "_lastai"));
if (mrb_cptr_p(lastai)) {
freeaddrinfo((struct addrinfo*)mrb_cptr(lastai));

Set protocol of AddrInfo