ap_listen.h revision a742cbb3e85669473b3233f30e3978bb6a20083c
2N/A/* Licensed to the Apache Software Foundation (ASF) under one or more 2N/A * contributor license agreements. See the NOTICE file distributed with 2N/A * this work for additional information regarding copyright ownership. 2N/A * The ASF licenses this file to You under the Apache License, Version 2.0 2N/A * (the "License"); you may not use this file except in compliance with 2N/A * the License. You may obtain a copy of the License at 2N/A * Unless required by applicable law or agreed to in writing, software 2N/A * distributed under the License is distributed on an "AS IS" BASIS, 2N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2N/A * See the License for the specific language governing permissions and 2N/A * limitations under the License. 2N/A * @brief Apache Listeners Library 2N/A * @defgroup APACHE_CORE_LISTEN Apache Listeners Library 2N/A * @ingroup APACHE_CORE 38N/A * @brief Apache's listeners record. 26N/A * These are used in the Multi-Processing Modules 26N/A * to setup all of the sockets for the MPM to listen to and accept on. 26N/A * The next listener in the list 26N/A * The actual socket 26N/A * The sockaddr the socket should bind to 26N/A * The accept function for this socket 26N/A * Is this socket currently active 26N/A * The default protocol for this listening socket. 2N/A * The global list of ap_listen_rec structures 26N/A * Setup all of the defaults for the listener list 26N/A * Loop through the global ap_listen_rec list and create all of the required 2N/A * sockets. This executes the listen and bind on the sockets. 26N/A * @param s The global server_rec 30N/A * @return The number of open sockets. 27N/A * This function duplicates ap_listeners into multiple buckets when configured 27N/A * to (see ListenCoresBucketsRatio) and the platform supports it (eg. number of 38N/A * online CPU cores and SO_REUSEPORT available). 38N/A * @param p The config pool 38N/A * @param s The global server_rec 21N/A * @param buckets The array of listeners buckets. 7N/A * @param num_buckets The total number of listeners buckets (array size). 26N/A * @remark If the given *num_buckets is 0 (input), it will be computed 26N/A * according to the platform capacities, otherwise (positive) it 38N/A * will be preserved. The number of listeners duplicated will 26N/A * always match *num_buckets, be it computed or given. 46N/A * Loop through the global ap_listen_rec list and close each of the sockets. 46N/A * Loop through the given ap_listen_rec list and close each of the sockets. 2N/A * @param listener The listener to close. 46N/A/* Although these functions are exported from libmain, they are not really 53N/A * public functions. These functions are actually called while parsing the 26N/A * config file, when one of the LISTEN_COMMANDS directives is read. These 46N/A * should not ever be called by external modules. ALL MPMs should include 46N/A * LISTEN_COMMANDS in their command_rec table so that these functions are 46N/A "Maximum length of the queue of pending connections, as used by listen(2)"), \
26N/A "Ratio between the number of CPU cores (online) and the number of listeners buckets"), \
46N/A "A port number or a numeric IP address and a port number, and an optional protocol"), \
38N/A "Send buffer size in bytes"), \