bool

Socket::Option.bool(family, level, optname, bool) => sockopt
Class Public methods

Creates a new Socket::Option object which contains boolean as data. Actually 0 or 1 as int is used.

p Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, true)
#=> #<Socket::Option: INET SOCKET KEEPALIVE 1>

p Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, false)
#=> #<Socket::Option: AF_INET SOCKET KEEPALIVE 0>
doc_ruby_on_rails
2015-05-15 03:49:02
Comments
Leave a Comment

Please login to continue.