Qpid Proton C API  0.16.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
listener.h
Go to the documentation of this file.
1 #ifndef PROTON_LISTENER_H
2 #define PROTON_LISTENER_H 1
3 
4 /*
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  */
22 
23 #include <proton/types.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
42 typedef struct pn_proactor_t pn_proactor_t;
43 typedef struct pn_condition_t pn_condition_t;
52 
62 PN_EXTERN pn_listener_t *pn_listener(void);
63 
69 PN_EXTERN int pn_listener_accept(pn_listener_t*, pn_connection_t *connection);
70 
75 
85 PN_EXTERN void *pn_listener_get_context(pn_listener_t *listener);
86 
92 PN_EXTERN void pn_listener_set_context(pn_listener_t *listener, void *context);
93 
101 PN_EXTERN pn_record_t *pn_listener_attachments(pn_listener_t *listener);
102 
106 PN_EXTERN void pn_listener_close(pn_listener_t *l);
107 
112 
113 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* listener.h */
AMQP and API data types.
struct pn_listener_t pn_listener_t
A listener accepts connections.
Definition: listener.h:51
pn_record_t * pn_listener_attachments(pn_listener_t *listener)
Get the attachments that are associated with a listener object.
int pn_listener_accept(pn_listener_t *, pn_connection_t *connection)
Asynchronously accept a connection using the listener.
pn_condition_t * pn_listener_condition(pn_listener_t *l)
Get the error condition for a listener.
struct pn_proactor_t pn_proactor_t
The proactor, see pn_proactor()
Definition: proactor.h:63
pn_listener_t * pn_listener(void)
Create a listener.
pn_proactor_t * pn_listener_proactor(pn_listener_t *c)
The proactor associated with a listener.
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:275
void pn_listener_close(pn_listener_t *l)
Close the listener (thread safe).
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64