- * \return The socket fd on success, -E_SOCKET on errors.
- *
- * \sa socket(2)
- */
-int get_socket(void)
-{
- int socket_fd;
-
- if ((socket_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
- return -E_SOCKET;
- return socket_fd;
-}
-
-/**
- * a wrapper around connect(2)
- *
- * \param fd the file descriptor
- * \param their_addr the address to connect