* @brief basic low-level networking interface
* @author Nils Durner
*/
-
#ifndef GNUNET_NETWORK_LIB_H
#define GNUNET_NETWORK_LIB_H
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
-GNUNET_NETWORK_socket_set_blocking (struct GNUNET_NETWORK_Handle *fd,
+GNUNET_NETWORK_socket_set_blocking (struct GNUNET_NETWORK_Handle *fd,
int doBlock);
-/**
- * Fail to bind if an address is already in use.
- */
-#define GNUNET_BIND_EXCLUSIVE 0x01
-
-
/**
* Bind a socket to a particular address.
*
* @param desc socket to bind
* @param address address to be bound
* @param address_len length of address
- * @param flags flags affecting bind behaviour
* @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
*/
int
GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
const struct sockaddr *address,
- socklen_t address_len,
- int flags);
+ socklen_t address_len);
/**
* Close a socket.
*
* @param desc socket to close
- * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
*/
int
GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc);
+/**
+ * Only free memory of a socket, keep the file descriptor untouched.
+ *
+ * @param desc socket
+ */
+void
+GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc);
+
+
/**
* Connect a socket to some remote address.
*