proton/proactor.h

Go to the documentation of this file.
00001 #ifndef PROTON_PROACTOR_H
00002 #define PROTON_PROACTOR_H 1
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <proton/condition.h>
00024 #include <proton/event.h>
00025 #include <proton/import_export.h>
00026 #include <proton/types.h>
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00074 #define PN_MAX_ADDR 1060
00075 
00086 PNP_EXTERN int pn_proactor_addr(char *addr, size_t size, const char *host, const char *port);
00087 
00091 PNP_EXTERN pn_proactor_t *pn_proactor(void);
00092 
00096 PNP_EXTERN void pn_proactor_free(pn_proactor_t *proactor);
00097 
00122 PNP_EXTERN void pn_proactor_connect2(pn_proactor_t *proactor, pn_connection_t *connection, pn_transport_t *transport, const char *addr);
00123 
00127 PNP_EXTERN void pn_proactor_connect(pn_proactor_t *proactor, pn_connection_t *connection, const char *addr);
00128 
00156 PNP_EXTERN void pn_proactor_listen(pn_proactor_t *proactor, pn_listener_t *listener, const char *addr, int backlog);
00157 
00180 PNP_EXTERN void pn_proactor_disconnect(pn_proactor_t *proactor, pn_condition_t *condition);
00181 
00198 PNP_EXTERN pn_event_batch_t *pn_proactor_wait(pn_proactor_t *proactor);
00199 
00206 PNP_EXTERN pn_event_batch_t *pn_proactor_get(pn_proactor_t *proactor);
00207 
00216 PNP_EXTERN void pn_proactor_done(pn_proactor_t *proactor, pn_event_batch_t *events);
00217 
00229 PNP_EXTERN void pn_proactor_interrupt(pn_proactor_t *proactor);
00230 
00242 PNP_EXTERN void pn_proactor_set_timeout(pn_proactor_t *proactor, pn_millis_t timeout);
00243 
00250 PNP_EXTERN void pn_proactor_cancel_timeout(pn_proactor_t *proactor);
00251 
00268 PNP_EXTERN void pn_proactor_release_connection(pn_connection_t *connection);
00269 
00282 PNP_EXTERN void pn_connection_wake(pn_connection_t *connection);
00283 
00291 PNP_EXTERN pn_proactor_t *pn_connection_proactor(pn_connection_t *connection);
00292 
00300 PNP_EXTERN pn_proactor_t *pn_event_proactor(pn_event_t *event);
00301 
00314 PNP_EXTERN pn_millis_t pn_proactor_now(void);
00315 
00371 #ifdef __cplusplus
00372 }
00373 #endif
00374 
00375 #endif /* proactor.h */

Generated on 29 Mar 2018 for Qpid Proton C by  doxygen 1.6.1