diff options
author | Ryan Bloom <rbb@apache.org> | 2000-03-15 02:10:35 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2000-03-15 02:10:35 +0000 |
commit | 4777dc199da3386a4bcd6dce38f560b5dd334c70 (patch) | |
tree | c95a8addb0184292fcc66ade796e3ed0c21b266b /include | |
parent | ce9caaee44ca9c7527cd35c7e4f7941b88aed0c3 (diff) | |
download | apr-4777dc199da3386a4bcd6dce38f560b5dd334c70.tar.gz |
Updating more docs. :-)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@59705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_network_io.h | 60 | ||||
-rw-r--r-- | include/apr_portable.h | 5 | ||||
-rw-r--r-- | include/arch/unix/mmap.c | 14 |
3 files changed, 50 insertions, 29 deletions
diff --git a/include/apr_network_io.h b/include/apr_network_io.h index bbef407ee..042b7b84d 100644 --- a/include/apr_network_io.h +++ b/include/apr_network_io.h @@ -138,30 +138,32 @@ struct hdtr_t { /* function definitions */ -ap_status_t ap_create_tcp_socket(ap_socket_t **, ap_context_t *); -ap_status_t ap_shutdown(ap_socket_t *, ap_shutdown_how_e); -ap_status_t ap_close_socket(ap_socket_t *); - -ap_status_t ap_bind(ap_socket_t *); -ap_status_t ap_listen(ap_socket_t *, ap_int32_t); -ap_status_t ap_accept(ap_socket_t **, const ap_socket_t *, ap_context_t *); -ap_status_t ap_connect(ap_socket_t *, char *); - -ap_status_t ap_get_remote_hostname(char **, ap_socket_t *); -ap_status_t ap_gethostname(char *, int, ap_context_t *); -ap_status_t ap_get_socketdata(void **, char *, ap_socket_t *); -ap_status_t ap_set_socketdata(ap_socket_t *, void *, char *, +ap_status_t ap_create_tcp_socket(ap_socket_t **new, ap_context_t *cont); +ap_status_t ap_shutdown(ap_socket_t *ithesocket, ap_shutdown_how_e how); +ap_status_t ap_close_socket(ap_socket_t *thesocket); + +ap_status_t ap_bind(ap_socket_t *sock); +ap_status_t ap_listen(ap_socket_t *sock, ap_int32_t backlog); +ap_status_t ap_accept(ap_socket_t **new, const ap_socket_t *sock, + ap_context_t *connection_context); +ap_status_t ap_connect(ap_socket_t *sock, char *hostname); + +ap_status_t ap_get_remote_hostname(char **name, ap_socket_t *sock); +ap_status_t ap_gethostname(char *buf, int len, ap_context_t *cont); +ap_status_t ap_get_socketdata(void **data, char *key, ap_socket_t *sock); +ap_status_t ap_set_socketdata(ap_socket_t *sock, void *data, char *key, ap_status_t (*cleanup) (void*)); -ap_status_t ap_send(ap_socket_t *, const char *, ap_ssize_t *); -ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec, ap_int32_t nvec, ap_int32_t *nbytes); +ap_status_t ap_send(ap_socket_t *sock, const char *buf, ap_ssize_t *len); +ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec, + ap_int32_t nvec, ap_int32_t *len); #if APR_HAS_SENDFILE -ap_status_t ap_sendfile(ap_socket_t *sock, ap_file_t *file, ap_hdtr_t *hdtr, ap_off_t *offset, - ap_size_t *len, ap_int32_t flags); +ap_status_t ap_sendfile(ap_socket_t *sock, ap_file_t *file, ap_hdtr_t *hdtr, + ap_off_t *offset, ap_size_t *len, ap_int32_t flags); #endif -ap_status_t ap_recv(ap_socket_t *, char *, ap_ssize_t *); +ap_status_t ap_recv(ap_socket_t *sock, char *buf, ap_ssize_t *len); -ap_status_t ap_setsocketopt(ap_socket_t *, ap_int32_t, ap_int32_t); +ap_status_t ap_setsocketopt(ap_socket_t *sock, ap_int32_t opt, ap_int32_t on); ap_status_t ap_set_local_port(ap_socket_t *sock, ap_uint32_t port); ap_status_t ap_set_remote_port(ap_socket_t *sock, ap_uint32_t port); @@ -175,14 +177,18 @@ ap_status_t ap_get_remote_ipaddr(char **addr, const ap_socket_t *sock); ap_status_t ap_get_local_name(struct sockaddr_in **name, const ap_socket_t *sock); ap_status_t ap_get_remote_name(struct sockaddr_in **name, const ap_socket_t *sock); -ap_status_t ap_setup_poll(ap_pollfd_t **, ap_int32_t, ap_context_t *); -ap_status_t ap_poll(ap_pollfd_t *, ap_int32_t *, ap_int32_t); -ap_status_t ap_add_poll_socket(ap_pollfd_t *, ap_socket_t *, ap_int16_t); -ap_status_t ap_remove_poll_socket(ap_pollfd_t *, ap_socket_t *, ap_int16_t); -ap_status_t ap_clear_poll_sockets(ap_pollfd_t *, ap_int16_t); -ap_status_t ap_get_revents(ap_int16_t *, ap_socket_t *, ap_pollfd_t *); -ap_status_t ap_get_polldata(ap_pollfd_t *, char *, void *); -ap_status_t ap_set_polldata(ap_pollfd_t *, void *, char *, +ap_status_t ap_setup_poll(ap_pollfd_t **new, ap_int32_t num, + ap_context_t *cont); +ap_status_t ap_poll(ap_pollfd_t *aprset, ap_int32_t *nsds, ap_int32_t timeout); +ap_status_t ap_add_poll_socket(ap_pollfd_t *aprset, ap_socket_t *socket, + ap_int16_t event); +ap_status_t ap_remove_poll_socket(ap_pollfd_t *aprset, ap_socket_t *sock, + ap_int16_t events); +ap_status_t ap_clear_poll_sockets(ap_pollfd_t *aprset, ap_int16_t events); +ap_status_t ap_get_revents(ap_int16_t *event, ap_socket_t *sock, + ap_pollfd_t *aprset); +ap_status_t ap_get_polldata(ap_pollfd_t *pollfd, char *key, void *data); +ap_status_t ap_set_polldata(ap_pollfd_t *pollfd, void *data, char *key, ap_status_t (*cleanup) (void *)); /* accessor functions */ diff --git a/include/apr_portable.h b/include/apr_portable.h index 45495791a..9996773d0 100644 --- a/include/apr_portable.h +++ b/include/apr_portable.h @@ -181,7 +181,7 @@ typedef struct tm ap_os_exp_time_t; ap_status_t ap_get_os_file(ap_os_file_t *thefile, ap_file_t *file); ap_status_t ap_get_os_dir(ap_os_dir_t **thedir, ap_dir_t *dir); -ap_status_t ap_get_os_sock(ap_os_sock_t *, ap_socket_t *); +ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, ap_socket_t *sock); ap_status_t ap_get_os_lock(ap_os_lock_t *oslock, ap_lock_t *lock); ap_status_t ap_get_os_proc(ap_os_proc_t *, ap_proc_t *); ap_status_t ap_get_os_exp_time(ap_os_exp_time_t **, ap_exploded_time_t *); @@ -195,7 +195,8 @@ ap_status_t ap_put_os_file(ap_file_t **file, ap_os_file_t *thefile, ap_context_t *cont); ap_status_t ap_put_os_dir(ap_dir_t **dir, ap_os_dir_t *thedir, ap_context_t *cont); -ap_status_t ap_put_os_sock(ap_socket_t **, ap_os_sock_t *, ap_context_t *); +ap_status_t ap_put_os_sock(ap_socket_t **sock, ap_os_sock_t *thesock, + ap_context_t *cont); ap_status_t ap_put_os_lock(ap_lock_t **lock, ap_os_lock_t *thelock, ap_context_t *cont); ap_status_t ap_put_os_proc(ap_proc_t **, ap_os_proc_t *, ap_context_t *); diff --git a/include/arch/unix/mmap.c b/include/arch/unix/mmap.c index 34cfa8e0c..8a252ba63 100644 --- a/include/arch/unix/mmap.c +++ b/include/arch/unix/mmap.c @@ -76,6 +76,15 @@ ap_status_t mmap_cleanup(void *themmap) return errno; } +/* ***APRDOC******************************************************** + * ap_status_t ap_mmap_create(ap_mmap_t **new, ap_file_t *file, ap_off_t offset) + * Create a new mmap'ed file out of an existing APR file. + * arg 1) The newly created mmap'ed file. + * arg 2) The file turn into an mmap. + * arg 3) The offset into the file to start the data pointer at. + * arg 4) The size of the file + * arg 5) The context to use when creating the mmap. + */ ap_status_t ap_mmap_create(ap_mmap_t **new, ap_file_t *file, ap_off_t offset, ap_size_t size, ap_context_t *cont) { @@ -103,6 +112,11 @@ ap_status_t ap_mmap_create(ap_mmap_t **new, ap_file_t *file, ap_off_t offset, return APR_SUCCESS; } +/* ***APRDOC******************************************************** + * ap_status_t ap_mmap_delete(ap_mmap_t *mmap) + * Remove a mmap'ed. + * arg 1) The mmap'ed file. + */ ap_status_t ap_mmap_delete(struct mmap_t *mmap) { ap_status_t rv; |