diff options
author | dgaudet <dgaudet@13f79535-47bb-0310-9956-ffa450edef68> | 2000-04-14 01:38:48 +0000 |
---|---|---|
committer | dgaudet <dgaudet@13f79535-47bb-0310-9956-ffa450edef68> | 2000-04-14 01:38:48 +0000 |
commit | df74212ca78b04395f406cc01abb92e844660483 (patch) | |
tree | 02f9226b718c9c1869fe8c13629ff4feace63705 /network_io/unix/sockets.c | |
parent | 1b647fea40c6707b23f7358c6fe0c522dc218d71 (diff) | |
download | libapr-df74212ca78b04395f406cc01abb92e844660483.tar.gz |
more documentation movement
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59841 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/unix/sockets.c')
-rw-r--r-- | network_io/unix/sockets.c | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c index 51c59e446..685780b87 100644 --- a/network_io/unix/sockets.c +++ b/network_io/unix/sockets.c @@ -67,12 +67,6 @@ static ap_status_t socket_cleanup(void *sock) } } -/* ***APRDOC******************************************************** - * ap_status_t ap_create_tcp_socket(ap_socket_t **new, ap_context_t *cont) - * Create a socket for tcp communication. - * arg 1) The new socket that has been setup. - * arg 2) The context to use - */ ap_status_t ap_create_tcp_socket(ap_socket_t **new, ap_context_t *cont) { (*new) = (ap_socket_t *)ap_palloc(cont, sizeof(ap_socket_t)); @@ -106,17 +100,6 @@ ap_status_t ap_create_tcp_socket(ap_socket_t **new, ap_context_t *cont) return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_shutdown(ap_socket_t *thesocket, ap_shutdown_how_e how) - * Shutdown either reading, writing, or both sides of a tcp socket. - * arg 1) The socket to close - * arg 2) How to shutdown the socket. One of: - * APR_SHUTDOWN_READ -- no longer allow read requests - * APR_SHUTDOWN_WRITE -- no longer allow write requests - * APR_SHUTDOWN_READWRITE -- no longer allow read or write requests - * NOTE: This does not actually close the socket descriptor, it just - * controls which calls are still valid on the socket. - */ ap_status_t ap_shutdown(ap_socket_t *thesocket, ap_shutdown_how_e how) { if (shutdown(thesocket->socketdes, how) == 0) { @@ -127,24 +110,12 @@ ap_status_t ap_shutdown(ap_socket_t *thesocket, ap_shutdown_how_e how) } } -/* ***APRDOC******************************************************** - * ap_status_t ap_close_socket(ap_socket_t *thesocket) - * Close a tcp socket. - * arg 1) The socket to close - */ ap_status_t ap_close_socket(ap_socket_t *thesocket) { ap_kill_cleanup(thesocket->cntxt, thesocket, socket_cleanup); return socket_cleanup(thesocket); } -/* ***APRDOC******************************************************** - * ap_status_t ap_bind(ap_socket_t *sock) - * Bind the socket to it's assocaited port - * arg 1) The socket to bind - * NOTE: This is where we will find out if there is any other process - * using the selected port. - */ ap_status_t ap_bind(ap_socket_t *sock) { if (bind(sock->socketdes, (struct sockaddr *)sock->local_addr, sock->addr_len) == -1) @@ -153,14 +124,6 @@ ap_status_t ap_bind(ap_socket_t *sock) return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_listen(ap_socket_t *sock, ap_int32_t backlog) - * Listen to a bound socketi for connections. - * arg 1) The socket to listen on - * arg 2) 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. - */ ap_status_t ap_listen(ap_socket_t *sock, ap_int32_t backlog) { if (listen(sock->socketdes, backlog) == -1) @@ -169,16 +132,6 @@ ap_status_t ap_listen(ap_socket_t *sock, ap_int32_t backlog) return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_accept(ap_socket_t **new, ap_socket_t *sock, - ap_context_t *connection_context) - * Accept a new connection request - * arg 1) A copy of the socket that is connected to the socket that - * made the connection request. This is the socket which should - * be used for all future communication. - * arg 2) The socket we are listening on. - * arg 3) The context for the new socket. - */ ap_status_t ap_accept(ap_socket_t **new, const ap_socket_t *sock, ap_context_t *connection_context) { (*new) = (ap_socket_t *)ap_palloc(connection_context, @@ -212,15 +165,6 @@ ap_status_t ap_accept(ap_socket_t **new, const ap_socket_t *sock, ap_context_t * return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_connect(ap_socket_t *sock, char *hostname) - * Issue a connection request to a socket either on the same machine - * or a different one. - * arg 1) The socket we wish to use for our side of the connection - * arg 2) The hostname of the machine we wish to connect to. If NULL, - * APR assumes that the sockaddr_in in the apr_socket is completely - * filled out. - */ ap_status_t ap_connect(ap_socket_t *sock, char *hostname) { struct hostent *hp; @@ -254,12 +198,6 @@ ap_status_t ap_connect(ap_socket_t *sock, char *hostname) } } -/* ***APRDOC******************************************************** - * ap_status_t ap_get_socketdata(void **data, char *key, ap_socket_t *sock) - * Return the context associated with the current socket. - * arg 1) The currently open socket. - * arg 2) The user data associated with the socket. - */ ap_status_t ap_get_socketdata(void **data, char *key, ap_socket_t *sock) { if (sock != NULL) { @@ -271,15 +209,6 @@ ap_status_t ap_get_socketdata(void **data, char *key, ap_socket_t *sock) } } -/* ***APRDOC******************************************************** - * ap_status_t ap_set_socketdata(ap_socket_t *sock, void *data, char *key, - ap_status_t (*cleanup) (void *)) - * Set the context associated with the current socket. - * arg 1) The currently open socket. - * arg 2) The user data to associate with the socket. - * arg 3) The key to associate with the data. - * arg 4) The cleanup to call when the socket is destroyed. - */ ap_status_t ap_set_socketdata(ap_socket_t *sock, void *data, char *key, ap_status_t (*cleanup) (void *)) { @@ -292,12 +221,6 @@ ap_status_t ap_set_socketdata(ap_socket_t *sock, void *data, char *key, } } -/* ***APRDOC******************************************************** - * ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) - * Convert the socket from an apr type to an OS specific socket - * arg 1) The socket to convert. - * arg 2) The os specifc equivelant of the apr socket.. - */ ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) { if (sock == NULL) { @@ -307,14 +230,6 @@ ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock) return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_put_os_sock(ap_socket_t **sock, ap_os_socket_t *thesock, - * ap_context_t *cont) - * Convert a socket from the os specific type to the apr type - * arg 1) The context to use. - * arg 2) The socket to convert to. - * arg 3) The socket we are converting to an apr type. - */ ap_status_t ap_put_os_sock(ap_socket_t **sock, ap_os_sock_t *thesock, ap_context_t *cont) { |