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.

1
2
3
4
5
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.