proton
0
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
proton
driver_extras.h
Go to the documentation of this file.
1
#ifndef PROTON_DRIVER_H_EXTRAS
2
#define PROTON_DRIVER_H_EXTRAS 1
3
4
/*
5
*
6
* Licensed to the Apache Software Foundation (ASF) under one
7
* or more contributor license agreements. See the NOTICE file
8
* distributed with this work for additional information
9
* regarding copyright ownership. The ASF licenses this file
10
* to you under the Apache License, Version 2.0 (the
11
* "License"); you may not use this file except in compliance
12
* with the License. You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing,
17
* software distributed under the License is distributed on an
18
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
* KIND, either express or implied. See the License for the
20
* specific language governing permissions and limitations
21
* under the License.
22
*
23
*/
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
#include <
proton/import_export.h
>
30
#include <
proton/io.h
>
31
32
/** @file
33
* Additional API for the Driver Layer.
34
*
35
* These additional driver functions allow the application to supply
36
* a separately created socket to the driver library.
37
*
38
*/
39
40
/** Create a listener using the existing file descriptor.
41
*
42
* @param[in] driver driver that will 'own' this listener
43
* @param[in] fd existing socket for listener to listen on
44
* @param[in] context application-supplied, can be accessed via
45
* pn_listener_context()
46
* @return a new listener on the given host:port, NULL if error
47
*/
48
PN_EXTERN
pn_listener_t
*
pn_listener_fd
(
pn_driver_t
*driver,
pn_socket_t
fd,
void
*context);
49
50
PN_EXTERN
pn_socket_t
pn_listener_get_fd
(
pn_listener_t
*listener);
51
52
/** Create a connector using the existing file descriptor.
53
*
54
* @param[in] driver driver that will 'own' this connector.
55
* @param[in] fd existing socket to use for this connector.
56
* @param[in] context application-supplied, can be accessed via
57
* pn_connector_context()
58
* @return a new connector to the given host:port, NULL if error.
59
*/
60
PN_EXTERN
pn_connector_t
*
pn_connector_fd
(
pn_driver_t
*driver,
pn_socket_t
fd,
void
*context);
61
62
PN_EXTERN
pn_socket_t
pn_connector_get_fd
(
pn_connector_t
*connector);
63
64
#ifdef __cplusplus
65
}
66
#endif
67
68
#endif
/* driver_extras.h */
Generated on Thu Jul 10 2014 02:10:59 for proton by
1.8.3.1