2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
13
* @brief Drizzle Declarations for Servers
16
#ifndef __DRIZZLE_SERVER_H
17
#define __DRIZZLE_SERVER_H
19
#include <libdrizzle/drizzle.h>
20
#include <libdrizzle/conn_server.h>
21
#include <libdrizzle/handshake_server.h>
22
#include <libdrizzle/command_server.h>
23
#include <libdrizzle/result_server.h>
24
#include <libdrizzle/column_server.h>
25
#include <libdrizzle/row_server.h>
26
#include <libdrizzle/field_server.h>
33
* @defgroup drizzle_server_interface Drizzle Server Interface
37
* @addtogroup drizzle_server Drizzle Declarations for Servers
38
* @ingroup drizzle_server_interface
43
* Add TCP (IPv4 or IPv6) connection for listening with common arguments.
45
* @param[in] drizzle Drizzle structure previously initialized with
46
* drizzle_create() or drizzle_clone().
47
* @param[in] con Caller allocated structure, or NULL to allocate one.
48
* @param[in] host Host to listen on. This may be a hostname to resolve, an
49
* IPv4 address, or an IPv6 address. This is passed directly to getaddrinfo().
50
* @param[in] port Port to connect to.
51
* @param[in] backlog Number of backlog connections passed to listen().
52
* @param[in] options Drizzle connection options to add.
53
* @return Same return as drizzle_con_create().
56
drizzle_con_st *drizzle_con_add_tcp_listen(drizzle_st *drizzle,
58
const char *host, in_port_t port,
60
drizzle_con_options_t options);
63
* Add unix domain socket connection for listening with common arguments.
65
* @param[in] drizzle Drizzle structure previously initialized with
66
* drizzle_create() or drizzle_clone().
67
* @param[in] con Caller allocated structure, or NULL to allocate one.
68
* @param[in] uds Path to unix domain socket to use for listening.
69
* @param[in] backlog Number of backlog connections passed to listen().
70
* @param[in] options Drizzle connection options to add.
71
* @return Same return as drizzle_con_create().
74
drizzle_con_st *drizzle_con_add_uds_listen(drizzle_st *drizzle,
76
const char *uds, int backlog,
77
drizzle_con_options_t options);
80
* Get next connection marked for listening that is ready for I/O.
82
* @param[in] drizzle Drizzle structure previously initialized with
83
* drizzle_create() or drizzle_clone().
84
* @return Connection that is ready to accept, or NULL if there are none.
87
drizzle_con_st *drizzle_con_ready_listen(drizzle_st *drizzle);
90
* Accept a new connection and initialize the connection structure for it.
92
* @param[in] drizzle Drizzle structure previously initialized with
93
* drizzle_create() or drizzle_clone().
94
* @param[in] con Caller allocated structure, or NULL to allocate one.
95
* @param[out] ret_ptr Standard drizzle return value.
96
* @return Same return as drizzle_con_create().
99
drizzle_con_st *drizzle_con_accept(drizzle_st *drizzle, drizzle_con_st *con,
100
drizzle_return_t *ret_ptr);
108
#endif /* __DRIZZLE_SERVER_H */