method

unpack

ruby latest stable - Class: Socket::Option

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_2_180) is shown here.

unpack(p1)
public

Calls String#unpack on sockopt.data.

sockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i"))
p sockopt.unpack("i")      #=> [1]
p sockopt.data.unpack("i") #=> [1]