sendmsg

basicsocket.sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent Instance Public methods 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. T

sendmsg_nonblock

basicsocket.sendmsg_nonblock(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent Instance Public methods #sendmsg_nonblock sends a message using sendmsg(2) system call in non-blocking manner. It is similar to #sendmsg but the non-blocking flag is set before the system call and it doesn't retry the system call.

setsockopt

setsockopt(level, optname, optval)setsockopt(socketoption) Instance Public methods Sets a socket option. These are protocol and system specific, see your local system documentation for details. Parameters level is an integer, usually one of the SOL_ constants such as Socket::SOL_SOCKET, or a protocol level. A string or symbol of the name, possibly without prefix, is also accepted. optname is an integer, usually one of the SO_ constants, such as Socket::SO_REUSEADDR. A string or

shutdown

basicsocket.shutdown([how]) => 0 Instance Public methods Calls shutdown(2) system call. s.shutdown(Socket::SHUT_RD) disallows further read. s.shutdown(Socket::SHUT_WR) disallows further write. s.shutdown(Socket::SHUT_RDWR) disallows further read and write. how can be symbol or string: :RD, :SHUT_RD, âRDâ and âSHUT_RDâ are accepted as Socket::SHUT_RD. :WR, :SHUT_WR, âWRâ and âSHUT_WRâ are accepted as Socket::SHUT_WR. :RDWR, :SHUT_RDWR, âRDWRâ and âSHUT_RDWRâ are accepted as

new

new(utime = 0.0, stime = 0.0, cutime = 0.0, cstime = 0.0, real = 0.0, label = nil) Class Public methods Returns an initialized Tms object which has utime as the user CPU time, stime as the system CPU time, cutime as the children's user CPU time, cstime as the children's system CPU time, real as the elapsed real time and label as the label.

*

*(x) Instance Public methods Returns a new Tms object obtained by memberwise multiplication of the individual times for this Tms object by x.

+

+(other) Instance Public methods Returns a new Tms object obtained by memberwise summation of the individual times for this Tms object with those of the other Tms object. This method and #/() are useful for taking statistics.

-

-(other) Instance Public methods Returns a new Tms object obtained by memberwise subtraction of the individual times for the other Tms object from those of this Tms object.

/ 2

/(x) Instance Public methods Returns a new Tms object obtained by memberwise division of the individual times for this Tms object by x. This method and #+() are useful for taking statistics.

add

add() Instance Public methods Returns a new Tms object whose times are the sum of the times for this Tms object, plus the time required to execute the code block (blk).