diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-13 14:43:12 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-13 14:43:12 +0000 |
| commit | baa795371e7f42fa2944629892b2612fa8257967 (patch) | |
| tree | b18c7c5d19e8ecb1ccb1e882c90fc15d3d8b4aaa | |
| parent | d8ea613a49efb3139615aedc8f374b96b66ee01b (diff) | |
| download | ruby-baa795371e7f42fa2944629892b2612fa8257967.tar.gz ruby-baa795371e7f42fa2944629892b2612fa8257967.tar.xz ruby-baa795371e7f42fa2944629892b2612fa8257967.zip | |
rdoc update.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ext/socket/ancdata.c | 6 | ||||
| -rw-r--r-- | ext/socket/basicsocket.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 755fa3846..8fbe6bda0 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -993,7 +993,7 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock) /* * 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. * @@ -1010,7 +1010,7 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock) * 3-elements array. * 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: * @@ -1031,7 +1031,7 @@ bsock_sendmsg(int argc, VALUE *argv, VALUE sock) /* * 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. * diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c index 5510c659f..550c9500b 100644 --- a/ext/socket/basicsocket.c +++ b/ext/socket/basicsocket.c @@ -370,7 +370,13 @@ bsock_getpeername(VALUE sock) * * Socket.unix_server_loop("/tmp/sock") {|s| * 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 * s.close * end |
