Source
ssize_t zbx_tcp_recv_context(zbx_socket_t *s, zbx_tcp_recv_context_t *context, unsigned char flags, short *events)
/*
** Zabbix
** Copyright (C) 2001-2023 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.
**/
/* allow compilation on older Windows systems */
/* allow compilation on older Windows systems */
/* SOCK_CLOEXEC is Linux-specific, available since 2.6.23 */
extern ZBX_THREAD_LOCAL char info_buf[256];
extern int CONFIG_TCP_MAX_BACKLOG_SIZE;
static int socket_set_nonblocking(ZBX_SOCKET s);
static void tcp_set_socket_strerror_from_getaddrinfo(const char *ip);
static ssize_t tcp_read(zbx_socket_t *s, char *buffer, size_t size, short *events);
zbx_config_tls_t *zbx_config_tls_new(void)
{
zbx_config_tls_t *config_tls;