MySQL 8.3.0
Source Code Documentation
task_net.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef TASK_NET_H
24#define TASK_NET_H
25
26#include "xcom/result.h"
27#include "xcom/xcom_common.h"
28
29result xcom_checked_socket(int domain, int type, int protocol);
30struct addrinfo *xcom_caching_getaddrinfo(char const *server);
31int checked_getaddrinfo(const char *nodename, const char *servname,
32 const struct addrinfo *hints, struct addrinfo **res);
33
34int checked_getaddrinfo_port(const char *nodename, xcom_port port,
35 const struct addrinfo *hints,
36 struct addrinfo **res);
37
39
40int init_net();
41int deinit_net();
42
43#endif
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:32
required string type
Definition: replication_group_member_actions.proto:33
Definition: result.h:29
Definition: server_struct.h:38
int init_net()
Definition: task_net.cc:253
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:64
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:110
int deinit_net()
Definition: task_net.cc:255
void deinit_network_cache()
Definition: task_net.cc:197
struct addrinfo * xcom_caching_getaddrinfo(char const *server)
unsigned short xcom_port
Definition: xcom_common.h:45