diff src/network.h @ 12730:d5b8f4dc1622

[gaim-migrate @ 15074] Update gaim_network_listen*() to have the socket type specified. This allows us to use the same functionality to listen on UDP sockets too. There are probably a couple things that should be updated to use this. I also updated SIMPLE to allow the connect port to be specified in the account options. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 05 Jan 2006 05:04:07 +0000
parents 9c5a2f0bb32c
children 8e3b85fe4a55
line wrap: on
line diff
--- a/src/network.h	Thu Jan 05 04:32:25 2006 +0000
+++ b/src/network.h	Thu Jan 05 05:04:07 2006 +0000
@@ -115,11 +115,13 @@
  * returned.
  *
  * @param port The port number to bind to.  Must be greater than 0.
+ * @param socket_type The type of socket to open for listening.
+ *   This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
  *
  * @return The file descriptor of the listening socket, or -1 if
  *         no socket could be established.
  */
-int gaim_network_listen(unsigned short port);
+int gaim_network_listen(unsigned short port, int socket_type);
 
 /**
  * Opens a listening port selected from a range of ports.  The range of
@@ -140,11 +142,14 @@
  * @param end The highest possible port in the range of ports to listen on,
  *            or 0 to pick a random port.  Users are allowed to override this
  *            arg in prefs.
+ * @param socket_type The type of socket to open for listening.
+ *   This will be either SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
  *
  * @return The file descriptor of the listening socket, or -1 if
  *         no socket could be established.
  */
-int gaim_network_listen_range(unsigned short start, unsigned short end);
+int gaim_network_listen_range(unsigned short start, unsigned short end,
+	int socket_type);
 
 /**
  * Gets a port number from a file descriptor.