397398399400401402403404405406407
soProtocol = protocolFamily; } private void initType(Ruby runtime, IRubyObject type) { Sock sockType = SocketUtils.sockFromArg(type); if (sockType == null) { throw SocketUtils.sockerr(runtime, "unknown socket type " + type); }
471472473474475476477478479480481
return addressFamily; } static Sock sockFromArg(IRubyObject type) { Sock sockType = null; if(type instanceof RubyString || type instanceof RubySymbol) { String typeString = type.toString(); sockType = Sock.valueOf("SOCK_" + typeString); } else {
304305306307308309310311312313314
} boolean is_ipv6 = addressFamily == AddressFamily.AF_INET6; boolean sock_stream = true; boolean sock_dgram = true; Sock sock = SOCK_STREAM; if(!socktype.isNil()) { sockFromArg(socktype); if(sock == SOCK_STREAM) { sock_dgram = false;
546547548549550551552553554555556
423424425426427428429430431432433