MySQL 8.4.2
Source Code Documentation
task_net.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef TASK_NET_H
25#define TASK_NET_H
26
27#include "xcom/result.h"
28#include "xcom/xcom_common.h"
29
30result xcom_checked_socket(int domain, int type, int protocol);
31struct addrinfo *xcom_caching_getaddrinfo(char const *server);
32int checked_getaddrinfo(const char *nodename, const char *servname,
33 const struct addrinfo *hints, struct addrinfo **res);
34
35int checked_getaddrinfo_port(const char *nodename, xcom_port port,
36 const struct addrinfo *hints,
37 struct addrinfo **res);
38
40
41int init_net();
42int deinit_net();
43
44#endif
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
required string type
Definition: replication_group_member_actions.proto:34
Definition: result.h:30
Definition: server_struct.h:39
int init_net()
Definition: task_net.cc:254
result xcom_checked_socket(int domain, int type, int protocol)
int checked_getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
Wrapper function which retries and checks errors from getaddrinfo.
Definition: task_net.cc:65
int checked_getaddrinfo_port(const char *nodename, xcom_port port, const struct addrinfo *hints, struct addrinfo **res)
Wrapper function to checked_getaddrinfo that accepts a numeric port.
Definition: task_net.cc:111
int deinit_net()
Definition: task_net.cc:256
void deinit_network_cache()
Definition: task_net.cc:198
struct addrinfo * xcom_caching_getaddrinfo(char const *server)
unsigned short xcom_port
Definition: xcom_common.h:46