stas 2004/04/08 14:25:25 Modified: src/docs/2.0/api/APR Const.pod Socket.pod Log: document - ':socket' constants - opt_get/opt_set methods Revision Changes Path 1.10 +64 -1 modperl-docs/src/docs/2.0/api/APR/Const.pod Index: Const.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/APR/Const.pod,v retrieving revision 1.9 retrieving revision 1.10 diff -u -u -r1.9 -r1.10 --- Const.pod 27 Feb 2004 19:29:44 -0000 1.9 +++ Const.pod 8 Apr 2004 21:25:25 -0000 1.10 @@ -586,30 +586,93 @@ use APR::Const -compile => qw(:socket); -The C<:socket> group is for XXX constants. +The C<:socket> group is for the +C<L<APR::Socket|docs::2.0::api::APR::Socket>> object constants, in +methods C<L<opt_get|docs::2.0::api::APR::Socket/C_opt_get_>> and +C<L<opt_set|docs::2.0::api::APR::Socket/C_opt_set_>>. + +The following section discusses in detail each of the C<:socket> +constants. =head3 C<APR::SO_DEBUG> +Turns on debugging information + +Possible values: + +XXX =head3 C<APR::SO_DISCONNECTED> +Queries the disconnected state of the socket. (Currently only used on +Windows) + +Possible values: + +XXX =head3 C<APR::SO_KEEPALIVE> +Keeps connections active + +Possible values: + +XXX =head3 C<APR::SO_LINGER> +Lingers on close if data is present =head3 C<APR::SO_NONBLOCK> +Turns blocking IO mode on/off for socket. + +Possible values: + + 1 nonblocking + 0 blocking + +For example, to set the socket to a blocking IO mode: + + use APR::Socket (); + use APR::Const -compile => qw(SO_NONBLOCK); + ... + my $oldval = $sock->opt_set(APR::SO_NONBLOCK, 0); + die "failed to set the socket to a blocking IO mode: $ARP::err" + unless defined $oldval; + =head3 C<APR::SO_RCVBUF> +Controls the C<ReceiveBufferSize> setting + +Possible values: + +XXX =head3 C<APR::SO_REUSEADDR> +The rules used in validating addresses supplied to bind should allow +reuse of local addresses. + +Possible values: + +XXX =head3 C<APR::SO_SNDBUF> + +Controls the C<SendBufferSize> setting + +Possible values: + +XXX + + + + + + + 1.2 +33 -41 modperl-docs/src/docs/2.0/api/APR/Socket.pod Index: Socket.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/APR/Socket.pod,v retrieving revision 1.1 retrieving revision 1.2 diff -u -u -r1.1 -r1.2 --- Socket.pod 13 Jan 2004 02:51:49 -0000 1.1 +++ Socket.pod 8 Apr 2004 21:25:25 -0000 1.2 @@ -144,87 +144,79 @@ =head2 C<opt_get> -META: Autogenerated - needs to be reviewed/completed - Query socket options for the specified socket - $ret = $sock->opt_get($opt, $on); + $val = $sock->opt_get($opt); + die "failed to \$sock->opt_get: $ARP::err" unless defined $val; =over 4 =item arg1: C<$sock> (C<L<APR::Socket|docs::2.0::api::APR::Socket>>) -The socket to query - -=item arg2: C<$opt> (integer) - -The option we would like to query. One of: +The socket object to query - APR::SO_DEBUG -- turn on debugging information - APR::SO_KEEPALIVE -- keep connections active - APR::SO_LINGER -- lingers on close if data is present - APR::SO_NONBLOCK -- Turns blocking on/off for socket - APR::SO_REUSEADDR -- The rules used in validating addresses - supplied to bind should allow reuse - of local addresses. - APR::SO_SNDBUF -- Set the SendBufferSize - APR::SO_RCVBUF -- Set the ReceiveBufferSize - APR::SO_DISCONNECTED -- Query the disconnected state of the socket. - (Currently only used on Windows) +=item arg2: C<$opt> +(C<L<APR::Const|docs::2.0::api::APR::Const/C__socket_>> constant) +The socket option we would like to configure. Here are the +L<available socket options|docs::2.0::api::APR::Const/C__socket_>. -=item arg3: C<$on> (integer) +=item ret: C<$val> (integer) -Socket option returned on the call. - -=item ret: C<$ret> (integer) +If a defined value is returned, it's the currently set value. +If C<undef> is returned, the operation has failed, check C<$ARP::err> +for the error message. +=item since: 1.99_14 =back +Examples can be found in L<the socket options constants +section|docs::2.0::api::APR::Const/C__socket_>. -=head2 C<opt_set> -META: Autogenerated - needs to be reviewed/completed +=head2 C<opt_set> Setup socket options for the specified socket - $ret = $sock->opt_set($opt, $on); + $oldval = $sock->opt_set($opt, $val); + die "failed to \$sock->opt_set: $ARP::err" unless defined $oldval; =over 4 =item arg1: C<$sock> (C<L<APR::Socket|docs::2.0::api::APR::Socket>>) -The socket to set up. +The socket object to set up. -=item arg2: C<$opt> (integer) +=item arg2: C<$opt> +(C<L<APR::Const|docs::2.0::api::APR::Const/C__socket_>> constant) -The option we would like to configure. One of: +The socket option we would like to configure. Here are the +L<available socket options|docs::2.0::api::APR::Const/C__socket_>. - APR::SO_DEBUG -- turn on debugging information - APR::SO_KEEPALIVE -- keep connections active - APR::SO_LINGER -- lingers on close if data is present - APR::SO_NONBLOCK -- Turns blocking on/off for socket - APR::SO_REUSEADDR -- The rules used in validating addresses - supplied to bind should allow reuse of local - addresses. - APR::SO_SNDBUF -- Set the SendBufferSize - APR::SO_RCVBUF -- Set the ReceiveBufferSize +=item arg3: C<$val> (integer) -=item arg3: C<$on> (integer) +Value for the option. Refer to the L<socket +options|docs::2.0::api::APR::Const/C__socket_> section to learn about +the expected values. -Value for the option. +=item ret: C<$oldval> (integer) -=item ret: C<$ret> (integer) +If a defined value is returned, it's the previously set value. +If C<undef> is returned, the operation has failed, check C<$ARP::err> +for the error message. +=item since: 1.99_14 =back +Examples can be found in L<the socket options constants +section|docs::2.0::api::APR::Const/C__socket_>.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]