mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a8de15e0b5
commit
f871e8cf0d
1 changed files with 31 additions and 0 deletions
|
@ -34,6 +34,16 @@ optname_to_sym(int level, int optname)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* Socket::Option.new(family, level, optname, data) => sockopt
|
||||
*
|
||||
* Returns a new Socket::Option object.
|
||||
*
|
||||
* sockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i"))
|
||||
* p sockopt #=> #<Socket::Option: INET SOCKET KEEPALIVE 1>
|
||||
*
|
||||
*/
|
||||
static VALUE
|
||||
sockopt_initialize(VALUE self, VALUE vfamily, VALUE vlevel, VALUE voptname, VALUE data)
|
||||
{
|
||||
|
@ -333,6 +343,17 @@ inspect_local_peercred(int level, int optname, VALUE data, VALUE ret)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* sockopt.inspect => string
|
||||
*
|
||||
* Returns a string which shows sockopt in human-readable form.
|
||||
*
|
||||
* p Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")).inspect
|
||||
* #=> "#<Socket::Option: INET SOCKET KEEPALIVE 1>"
|
||||
*
|
||||
*/
|
||||
static VALUE
|
||||
sockopt_inspect(VALUE self)
|
||||
{
|
||||
|
@ -522,6 +543,16 @@ sockopt_inspect(VALUE self)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* sockopt.unpack(template) => array
|
||||
*
|
||||
* Calls String#unpack on sockopt.data.
|
||||
*
|
||||
* sockopt = Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i"))
|
||||
* p sockopt.unpack("i") #=> [1]
|
||||
* p sockopt.data.unpack("i") #=> [1]
|
||||
*/
|
||||
static VALUE
|
||||
sockopt_unpack(VALUE self, VALUE template)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue