Server IP : 111.118.215.189 / Your IP : 216.73.216.162 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /proc/thread-self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/BasicSocket/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
U:RDoc::AnyMethod[iI"recvmsg:EFI"BasicSocket#recvmsg;TF:publico:RDoc::Markup::Document:@parts[#o:RDoc::Markup::Paragraph; [I"Precvmsg receives a message using recvmsg(2) system call in blocking manner.;To:RDoc::Markup::BlankLine o; ; [I";_maxmesglen_ is the maximum length of mesg to receive.;T@o; ; [I"G_flags_ is bitwise OR of MSG_* constants such as Socket::MSG_PEEK.;T@o; ; [I"S_maxcontrollen_ is the maximum length of controls (ancillary data) to receive.;T@o; ; [I"_opts_ is option hash. ;TI"4Currently :scm_rights=>bool is the only option.;T@o; ; [ I"W:scm_rights option specifies that application expects SCM_RIGHTS control message. ;TI"YIf the value is nil or false, application don't expects SCM_RIGHTS control message. ;TI"KIn this case, recvmsg closes the passed file descriptors immediately. ;TI""This is the default behavior.;T@o; ; [I"dIf :scm_rights value is neither nil nor false, application expects SCM_RIGHTS control message. ;TI"LIn this case, recvmsg creates IO objects for each file descriptors for ;TI".Socket::AncillaryData#unix_rights method.;T@o; ; [I"*The return value is 4-elements array.;T@o; ; [I"0_mesg_ is a string of the received message.;T@o; ; [I"N_sender_addrinfo_ is a sender socket address for connection-less socket. ;TI"It is an Addrinfo object. ;TI"WFor connection-oriented socket such as TCP, sender_addrinfo is platform dependent.;T@o; ; [I"s_rflags_ is a flags on the received message which is bitwise OR of MSG_* constants such as Socket::MSG_TRUNC. ;TI"LIt will be nil if the system uses 4.3BSD style old recvmsg system call.;T@o; ; [I"]_controls_ is ancillary data which is an array of Socket::AncillaryData objects such as:;T@o:RDoc::Markup::Verbatim; [I"7#<Socket::AncillaryData: AF_UNIX SOCKET RIGHTS 7> ;T:@format0o; ; [ I"2_maxmesglen_ and _maxcontrollen_ can be nil. ;TI"PIn that case, the buffer will be grown until the message is not truncated. ;TI"#Internally, MSG_PEEK is used. ;TI";Buffer full and MSG_CTRUNC are checked for truncation.;T@o; ; [I"9recvmsg can be used to implement recv_io as follows:;T@o;; [I"Pmesg, sender_sockaddr, rflags, *controls = sock.recvmsg(:scm_rights=>true) ;TI"controls.each {|ancdata| ;TI"- if ancdata.cmsg_is?(:SOCKET, :RIGHTS) ;TI"' return ancdata.unix_rights[0] ;TI" end ;TI"};T; 0: @fileI"ext/socket/lib/socket.rb;T:0@omit_headings_from_table_of_contents_below0I"|basicsocket.recvmsg(maxmesglen=nil, flags=0, maxcontrollen=nil, opts={}) => [mesg, sender_addrinfo, rflags, *controls] ;T0[ I";(dlen = nil, flags = 0, clen = nil, scm_rights: false);T@MFI"BasicSocket;TcRDoc::NormalClass00