Class: XS::Socket
- Inherits:
-
Object
- Object
- XS::Socket
- Includes:
- CommonSocketBehavior, IdentitySupport
- Defined in:
- lib/ffi-rxs/socket.rb
Overview
module IdentitySupport
Instance Attribute Summary
Attributes included from CommonSocketBehavior
Instance Method Summary collapse
-
#getsockopt(name, array) ⇒ Object
Get the options set on this socket.
Methods included from IdentitySupport
Methods included from CommonSocketBehavior
#bind, #close, #connect, create, #initialize, #more_parts?, #recv_multipart, #recv_string, #recv_strings, #recvmsg, #recvmsgs, #send_and_close, #send_string, #send_strings, #sendmsg, #sendmsgs, #setsockopt, #shutdown
Instance Method Details
#getsockopt(name, array) ⇒ Object
Get the options set on this socket.
With a -1 return code, the user must check XS.errno to determine the cause.
657 658 659 660 661 662 663 664 665 666 |
# File 'lib/ffi-rxs/socket.rb', line 657 def getsockopt name, array rc = __getsockopt__ name, array if Util.resultcode_ok?(rc) && (RCVMORE == name) # convert to boolean array[0] = 1 == array[0] end rc end |