![]() |
Home / Documentation / 2.0 / API / | |||
| APR::Socket - Perl API for XXX | ||||
|
|
||
bindMETA: Autogenerated - needs to be reviewed/completed
Bind the socket to its associated port
$ret = $sock->bind($sa);
$sock (APR::Socket)
The socket to bind
$sa (APR::SockAddr)
The socket address to bind to
$ret (integer)
This may be where we will find out if there is any other process using the selected port.
closeMETA: Autogenerated - needs to be reviewed/completed
Close a socket.
$ret = $thesocket->close();
$thesocket (APR::Socket)
The socket to close
$ret (integer)
connectMETA: Autogenerated - needs to be reviewed/completed
Issue a connection request to a socket either on the same machine or a different one.
$ret = $sock->connect($sa);
$sock (APR::Socket)
The socket we wish to use for our side of the connection
$sa (APR::SockAddr)
The address of the machine we wish to connect to. If NULL, APR assumes that the sockaddr_in in the apr_socket is completely filled out.
$ret (integer)
listenMETA: Autogenerated - needs to be reviewed/completed
Listen to a bound socket for connections.
$ret = $sock->listen($backlog);
$sock (APR::Socket)
The socket to listen on
$backlog (integer)
The number of outstanding connections allowed in the sockets listen queue. If this value is less than zero, the listen queue size is set to zero.
$ret (integer)
opt_getMETA: Autogenerated - needs to be reviewed/completed
Query socket options for the specified socket
$ret = $sock->opt_get($opt, $on);
$sock (APR::Socket)
The socket to query
$opt (integer)
The option we would like to query. One of:
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)
$on (integer)
Socket option returned on the call.
$ret (integer)
opt_setMETA: Autogenerated - needs to be reviewed/completed
Setup socket options for the specified socket
$ret = $sock->opt_set($opt, $on);
$sock (APR::Socket)
The socket to set up.
$opt (integer)
The option we would like to configure. One of:
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
$on (integer)
Value for the option.
$ret (integer)
recvfromMETA: Autogenerated - needs to be reviewed/completed
$ret = $from->recvfrom($sock, $flags, $buf, $len);
$from (APR::SockAddr)
The apr_sockaddr_t to fill in the recipient info
$sock (APR::SockAddr)
The socket to use
$flags (integer)
The flags to use
$buf (integer)
The buffer to use
$len (string)
The length of the available buffer
$ret (integer)
sendtoMETA: Autogenerated - needs to be reviewed/completed
$ret = $sock->sendto($where, $flags, $buf, $len);
$sock (APR::Socket)
The socket to send from
$where (APR::Socket)
The apr_sockaddr_t describing where to send the data
$flags (integer)
The flags to use
$buf (scalar)
The data to send
$len (string)
The length of the data to send
$ret (integer)
timeout_setMETA: Autogenerated - needs to be reviewed/completed
Setup socket timeout for the specified socket
$ret = $sock->timeout_set($t);
$sock (APR::Socket)
The socket to set up.
$t (number)
Value for the timeout:
t > 0 -- read and write calls return APR::TIMEUP if specified time
elapsess with no data read or written
t == 0 -- read and write calls never block
t < 0 -- read and write calls block
$ret (integer)
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 1.1.
|
|