MySQL  8.0.20
Source Code Documentation
task_net.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
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 
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
33 
34 result xcom_checked_socket(int domain, int type, int protocol);
35 struct addrinfo *xcom_caching_getaddrinfo(char const *server);
36 int checked_getaddrinfo(const char *nodename, const char *servname,
37  const struct addrinfo *hints, struct addrinfo **res);
38 
39 int checked_getaddrinfo_port(const char *nodename, xcom_port port,
40  const struct addrinfo *hints,
41  struct addrinfo **res);
42 
43 int init_net();
44 int deinit_net();
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif
Definition: result.h:33
int deinit_net()
Definition: task_net.c:256
result xcom_checked_socket(int domain, int type, int protocol)
Wrapper function which retries and checks errors from socket.
Definition: task_net.c:55
protocol
Definition: memcached.h:112
unsigned short xcom_port
Definition: xcom_common.h:47
int init_net()
Definition: task_net.c:254
static in_port_t port
Definition: testapp.c:33
struct addrinfo * xcom_caching_getaddrinfo(char const *server)
Definition: task_net.c:181
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.c:121
Definition: server_struct.h:42
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.c:78