Method: Socket::Option#to_s
- Defined in:
- option.c
#data ⇒ String #to_s ⇒ String
returns the socket option data as a string.
p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).data
#=> "\x01\x00\x00\x00"
182 183 184 185 186 187 188 |
# File 'option.c', line 182 static VALUE sockopt_data(VALUE self) { VALUE v = rb_attr_get(self, rb_intern("data")); StringValue(v); return v; } |