@param callback A function to invoke whenever we get a DNS request
on the socket.
@param user_data Data to pass to the callback.
- @return an evdns_server_port structure for this server port.
+ @return an evdns_server_port structure for this server port or NULL if
+ an error occurred.
*/
EVENT2_EXPORT_SYMBOL
struct evdns_server_port *evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
@param callback_arg an argument to be passed to the callback function
@return a newly allocated struct event that must later be freed with
- event_free().
+ event_free() or NULL if an error occurred.
@see event_free(), event_add(), event_del(), event_assign()
*/
EVENT2_EXPORT_SYMBOL
* Create a new HTTP server.
*
* @param base (optional) the event base to receive the HTTP events
- * @return a pointer to a newly initialized evhttp server structure
+ * @return a pointer to a newly initialized evhttp server structure or NULL
+ * on error
* @see evhttp_free()
*/
EVENT2_EXPORT_SYMBOL
* when the connection closes. It must have no fd set on it.
* @param address the address to which to connect
* @param port the port to connect to
- * @return an evhttp_connection object that can be used for making requests
+ * @return an evhttp_connection object that can be used for making requests or
+ * NULL on error
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_bufferevent_new(
* specified host name resolution will block.
* @param address the address to which to connect
* @param port the port to connect to
- * @return an evhttp_connection object that can be used for making requests
+ * @return an evhttp_connection object that can be used for making requests or
+ * NULL on error
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evhttp_connection_base_new(
*
* @param address the address to which the HTTP server should be bound
* @param port the port number on which the HTTP server should listen
- * @return an struct evhttp object
+ * @return a pointer to a newly initialized evhttp server structure
+ * or NULL on error
*/
EVENT2_EXPORT_SYMBOL
struct evhttp *evhttp_start(const char *address, ev_uint16_t port);
/** Creates a new rpc base from which RPC requests can be received
*
* @param server a pointer to an existing HTTP server
- * @return a newly allocated evrpc_base struct
+ * @return a newly allocated evrpc_base struct or NULL if an error occurred
* @see evrpc_free()
*/
EVENT2_EXPORT_SYMBOL
*
* @param base a pointer to an struct event_based object; can be left NULL
* in singled-threaded applications
- * @return a newly allocated struct evrpc_pool object
+ * @return a newly allocated struct evrpc_pool object or NULL if an error
+ * occurred
* @see evrpc_pool_free()
*/
EVENT2_EXPORT_SYMBOL
* returns the connection object associated with the request
*
* @param ctx the context provided to the hook call
- * @return a pointer to the evhttp_connection object
+ * @return a pointer to the evhttp_connection object or NULL if an error
+ * occurred
*/
EVENT2_EXPORT_SYMBOL
struct evhttp_connection *evrpc_hook_get_connection(void *ctx);