Source
int zbx_ipc_socket_write(zbx_ipc_socket_t *csocket, zbx_uint32_t code, const unsigned char *data, zbx_uint32_t size)
/*
** Zabbix
** 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 General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
static char ipc_path[ZBX_IPC_PATH_MAX] = {0};
static size_t ipc_path_root_len = 0;
extern unsigned char program_type;
/* 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;