This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

sendmsg

        # BasicSocket.sendmsg

(from ruby core)
---
    basicsocket.sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent

---

sendmsg sends a message using sendmsg(2) system call in blocking manner.

*mesg* is a string to send.

*flags* is bitwise OR of MSG_* constants such as Socket::MSG_OOB.

*dest_sockaddr* is a destination socket address for connection-less
socket. It should be a sockaddr such as a result of Socket.sockaddr_in.
An Addrinfo object can be used too.

*controls* is a list of ancillary data. The element of *controls* should
be Socket::AncillaryData or 3-elements array. The 3-element array should
contains cmsg_level, cmsg_type and data.

The return value, *numbytes_sent* is an integer which is the number of
bytes sent.

sendmsg can be used to implement send_io as follows:

    # use Socket::AncillaryData.
    ancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, io.fileno)
    sock.sendmsg("a", 0, nil, ancdata)

    # use 3-element array.
    ancdata = [:SOCKET, :RIGHTS, [io.fileno].pack("i!")]
    sock.sendmsg("\0", 0, nil, ancdata)



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.