Source
int zbx_ipc_socket_write(zbx_ipc_socket_t *csocket, zbx_uint32_t code, const unsigned char *data, zbx_uint32_t size)
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
static char ipc_path[ZBX_IPC_PATH_MAX] = {0};
static size_t ipc_path_root_len = 0;
/* IPC client, providing nonblocking connections through socket */
struct zbx_ipc_client
{
zbx_ipc_socket_t csocket;
zbx_ipc_service_t *service;
zbx_uint32_t rx_header[2];
unsigned char *rx_data;
zbx_uint32_t rx_bytes;
zbx_queue_ptr_t rx_queue;
struct event *rx_event;
zbx_uint32_t tx_header[2];
unsigned char *tx_data;
zbx_uint32_t tx_bytes;
zbx_queue_ptr_t tx_queue;
struct event *tx_event;
zbx_uint64_t id;
unsigned char state;