All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_pipe.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Aerospike, Inc.
3  *
4  * Portions may be licensed to Aerospike, Inc. under one or more contributor
5  * license agreements.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
8  * use this file except in compliance with the License. You may obtain a copy of
9  * the License at http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14  * License for the specific language governing permissions and limitations under
15  * the License.
16  */
17 
18 #pragma once
19 
20 #include <aerospike/as_async.h>
21 #include <aerospike/as_log.h>
22 #include <aerospike/as_log_macros.h>
23 #include <aerospike/as_node.h>
24 #include <aerospike/as_socket.h>
25 
26 #include <citrusleaf/alloc.h>
27 #include <citrusleaf/cf_ll.h>
28 
29 #include <assert.h>
30 #include <errno.h>
31 #include <fcntl.h>
32 #include <inttypes.h>
33 #include <stdbool.h>
34 #include <stddef.h>
35 #include <stdint.h>
36 #include <unistd.h>
37 
38 #include <netinet/in.h>
39 #include <netinet/tcp.h>
40 
41 #include <sys/socket.h>
42 #include <sys/stat.h>
43 #include <sys/types.h>
44 
45 typedef struct as_pipe_connection {
48  cf_ll readers;
49  bool canceled;
50  bool in_pool;
52 
53 extern int
55 
56 extern int
58 
59 extern bool
61 
62 extern void
64 
65 extern void
67 
68 extern void
70 
71 extern void
73 
74 extern void
76 
77 extern void
79 
80 static inline as_event_command*
81 as_pipe_link_to_command(cf_ll_element* link)
82 {
83  return (as_event_command*)((uint8_t*)link - offsetof(as_event_command, pipe_link));
84 }