comparison src/network.h @ 13327:b7b31c69ade6

[gaim-migrate @ 15697] Whitespace, comments, and a warning fix committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 25 Feb 2006 22:31:53 +0000
parents 8e3b85fe4a55
children
comparison
equal deleted inserted replaced
13326:3955245c82f6 13327:b7b31c69ade6
22 * along with this program; if not, write to the Free Software 22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 #ifndef _GAIM_NETWORK_H_ 25 #ifndef _GAIM_NETWORK_H_
26 #define _GAIM_NETWORK_H_ 26 #define _GAIM_NETWORK_H_
27
28 /*
29 * TODO: This API needs a way to cancel pending calls to
30 * gaim_network_listen_range() and company.
31 */
27 32
28 #ifdef __cplusplus 33 #ifdef __cplusplus
29 extern "C" { 34 extern "C" {
30 #endif 35 #endif
31 36
134 * Opens a listening port selected from a range of ports. The range of 139 * Opens a listening port selected from a range of ports. The range of
135 * ports used is chosen in the following manner: 140 * ports used is chosen in the following manner:
136 * If a range is specified in preferences, these values are used. 141 * If a range is specified in preferences, these values are used.
137 * If a non-0 values are passed to the function as parameters, these 142 * If a non-0 values are passed to the function as parameters, these
138 * values are used. 143 * values are used.
139 * Otherwise a port is chosen at random by the kernel. 144 * Otherwise a port is chosen at random by the operating system.
140 * 145 *
141 * This opens a listening port. The caller will want to set up a watcher 146 * This opens a listening port. The caller will want to set up a watcher
142 * of type GAIM_INPUT_READ on the fd returned in cb. It will probably call 147 * of type GAIM_INPUT_READ on the fd returned in cb. It will probably call
143 * accept in the watcher callback, and then possibly remove the watcher and close 148 * accept in the watcher callback, and then possibly remove the watcher and close
144 * the listening socket, and add a new watcher on the new socket accept 149 * the listening socket, and add a new watcher on the new socket accept