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> |
Please login to continue.