method

new

Importance_2
Ruby latest stable (v2_5_5) - 0 notes - Class: AncillaryData

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.

These similar methods exist in v2_5_5:

new(p1, p2, p3, p4) public

family should be an integer, a string or a symbol.

  • Socket::AF_INET, “AF_INET”, “INET”, :AF_INET, :INET

  • Socket::AF_UNIX, “AF_UNIX”, “UNIX”, :AF_UNIX, :UNIX

  • etc.

cmsg_level should be an integer, a string or a symbol.

  • Socket::SOL_SOCKET, “SOL_SOCKET”, “SOCKET”, :SOL_SOCKET and :SOCKET

  • Socket::IPPROTO_IP, “IP” and :IP

  • Socket::IPPROTO_IPV6, “IPV6” and :IPV6

  • Socket::IPPROTO_TCP, “TCP” and :TCP

  • etc.

cmsg_type should be an integer, a string or a symbol. If a string/symbol is specified, it is interpreted depend on cmsg_level.

  • Socket::SCM_RIGHTS, “SCM_RIGHTS”, “RIGHTS”, :SCM_RIGHTS, :RIGHTS for SOL_SOCKET

  • Socket::IP_RECVTTL, “RECVTTL” and :RECVTTL for IPPROTO_IP

  • Socket::IPV6_PKTINFO, “PKTINFO” and :PKTINFO for IPPROTO_IPV6

  • etc.

cmsg_data should be a string.

p Socket::AncillaryData.new(:INET, :TCP, :NODELAY, "")
#=> #<Socket::AncillaryData: INET TCP NODELAY "">

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "")
#=> #<Socket::AncillaryData: INET6 IPV6 PKTINFO "">
Show source
Register or log in to add new notes.