new

Socket::AncillaryData.new(family, cmsg_level, cmsg_type, cmsg_data) â ancillarydata
Class Public methods

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 "">
doc_ruby_on_rails
2015-05-15 02:44:40
Comments
Leave a Comment

Please login to continue.