These functions extend the core connection functions with a set of functions for server application use. These functions allow you to set raw handshake information for use with the handshake write functions.
DRIZZLE_API int drizzle_con_backlog | ( | const drizzle_con_st * | con | ) |
Get connection backlog queue length.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
DRIZZLE_API void* drizzle_con_command_buffer | ( | drizzle_con_st * | con, |
drizzle_command_t * | command, | ||
size_t * | total, | ||
drizzle_return_t * | ret_ptr | ||
) |
Read command and buffer it.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[out] | command | Command that was read. |
[out] | total | The total size of all command data being read. |
[out] | ret_ptr | Standard drizzle return value. |
Definition at line 685 of file conn.c.
References drizzle_con_command_read(), and drizzle_set_error().
DRIZZLE_API void* drizzle_con_command_read | ( | drizzle_con_st * | con, |
drizzle_command_t * | command, | ||
size_t * | offset, | ||
size_t * | size, | ||
size_t * | total, | ||
drizzle_return_t * | ret_ptr | ||
) |
Read command without buffering.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[out] | command | Command that was read. |
[out] | offset | Where the data being returned begins in the command data. |
[out] | size | The size of the data chunk being returned. |
[out] | total | The total size of all command data being read. |
[out] | ret_ptr | Standard drizzle return value. |
Definition at line 657 of file conn.c.
References drizzle_state_loop(), drizzle_state_none(), and drizzle_state_push().
Referenced by drizzle_con_command_buffer().
DRIZZLE_API void drizzle_con_copy_handshake | ( | drizzle_con_st * | con, |
drizzle_con_st * | from | ||
) |
Copy all handshake information from one connection into another.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | from | Connection structure to copy from. |
Definition at line 642 of file conn.c.
References drizzle_con_set_auth(), drizzle_con_set_capabilities(), drizzle_con_set_charset(), drizzle_con_set_db(), drizzle_con_set_max_packet_size(), drizzle_con_set_protocol_version(), drizzle_con_set_scramble(), drizzle_con_set_server_version(), drizzle_con_set_status(), and drizzle_con_set_thread_id().
DRIZZLE_API drizzle_return_t drizzle_con_listen | ( | drizzle_con_st * | con | ) |
Put a connection into listening mode.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
Definition at line 561 of file conn.c.
References drizzle_state_loop(), drizzle_state_none(), and drizzle_state_push().
DRIZZLE_API void drizzle_con_set_backlog | ( | drizzle_con_st * | con, |
int | backlog | ||
) |
Set connection backlog queue length.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | backlog | Backlog to use for connection |
Definition at line 580 of file conn.c.
Referenced by drizzle_con_add_tcp_listen(), and drizzle_con_add_uds_listen().
DRIZZLE_API void drizzle_con_set_capabilities | ( | drizzle_con_st * | con, |
drizzle_capabilities_t | capabilities | ||
) |
Set capabilities for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | capabilities | Capabilities to use for connection |
Definition at line 620 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_charset | ( | drizzle_con_st * | con, |
drizzle_charset_t | charset | ||
) |
Set charset for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | charset | Character set to use for connection |
Definition at line 626 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_max_packet_size | ( | drizzle_con_st * | con, |
uint32_t | max_packet_size | ||
) |
Set max packet size for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | max_packet_size | Max packet size to use for connection |
Definition at line 636 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_protocol_version | ( | drizzle_con_st * | con, |
uint8_t | protocol_version | ||
) |
Set protocol version for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | protocol_version | Protocol version to use for connection |
Definition at line 585 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_scramble | ( | drizzle_con_st * | con, |
const uint8_t * | scramble | ||
) |
Set scramble buffer for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | scramble | Scramble to use for connection |
Definition at line 609 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_server_version | ( | drizzle_con_st * | con, |
const char * | server_version | ||
) |
Set server version string for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | server_version | Server version to use for connection |
Definition at line 591 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_status | ( | drizzle_con_st * | con, |
drizzle_con_status_t | status | ||
) |
Set status for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | status | Status to use for connection |
Definition at line 631 of file conn.c.
Referenced by drizzle_con_copy_handshake().
DRIZZLE_API void drizzle_con_set_thread_id | ( | drizzle_con_st * | con, |
uint32_t | thread_id | ||
) |
Set thread ID for a connection.
[in] | con | Connection structure previously initialized with drizzle_con_create(), drizzle_con_clone(), or related functions. |
[in] | thread_id | Thread ID to use for connection |
Definition at line 604 of file conn.c.
Referenced by drizzle_con_copy_handshake().