mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1fb7ce6303
commit
9842858add
2 changed files with 10 additions and 4 deletions
|
@ -993,7 +993,7 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* basicsocket.sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) => sent_len
|
* basicsocket.sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent
|
||||||
*
|
*
|
||||||
* sendmsg sends a message using sendmsg(2) system call in blocking manner.
|
* sendmsg sends a message using sendmsg(2) system call in blocking manner.
|
||||||
*
|
*
|
||||||
|
@ -1010,7 +1010,7 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
|
||||||
* 3-elements array.
|
* 3-elements array.
|
||||||
* The 3-element array should contains cmsg_level, cmsg_type and data.
|
* The 3-element array should contains cmsg_level, cmsg_type and data.
|
||||||
*
|
*
|
||||||
* The return value, _sent_len_, is an integer which is the number of bytes sent.
|
* The return value, _numbytes_sent_sent is an integer which is the number of bytes sent.
|
||||||
*
|
*
|
||||||
* sendmsg can be used to implement send_io as follows:
|
* sendmsg can be used to implement send_io as follows:
|
||||||
*
|
*
|
||||||
|
@ -1031,7 +1031,7 @@ bsock_sendmsg(int argc, VALUE *argv, VALUE sock)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* basicsocket.sendmsg_nonblock(mesg, flags=0, dest_sockaddr=nil, *controls) => sent_len
|
* basicsocket.sendmsg_nonblock(mesg, flags=0, dest_sockaddr=nil, *controls) => numbytes_sent
|
||||||
*
|
*
|
||||||
* sendmsg_nonblock sends a message using sendmsg(2) system call in non-blocking manner.
|
* sendmsg_nonblock sends a message using sendmsg(2) system call in non-blocking manner.
|
||||||
*
|
*
|
||||||
|
|
|
@ -370,7 +370,13 @@ bsock_getpeername(VALUE sock)
|
||||||
*
|
*
|
||||||
* Socket.unix_server_loop("/tmp/sock") {|s|
|
* Socket.unix_server_loop("/tmp/sock") {|s|
|
||||||
* begin
|
* begin
|
||||||
* p s.getpeereid #=> [1000, 1000]
|
* euid, egid = s.getpeereid
|
||||||
|
*
|
||||||
|
* # Check the connected client is myself or not.
|
||||||
|
* next if euid != Process.uid
|
||||||
|
*
|
||||||
|
* # do something about my resource.
|
||||||
|
*
|
||||||
* ensure
|
* ensure
|
||||||
* s.close
|
* s.close
|
||||||
* end
|
* end
|
||||||
|
|
Loading…
Add table
Reference in a new issue