Groonga 3.0.9 Source Code Document
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
groonga
vendor
nginx-1.4.2
src
event
ngx_event_connect.h
Go to the documentation of this file.
1
2
/*
3
* Copyright (C) Igor Sysoev
4
* Copyright (C) Nginx, Inc.
5
*/
6
7
8
#ifndef _NGX_EVENT_CONNECT_H_INCLUDED_
9
#define _NGX_EVENT_CONNECT_H_INCLUDED_
10
11
12
#include <
ngx_config.h
>
13
#include <
ngx_core.h
>
14
#include <
ngx_event.h
>
15
16
17
#define NGX_PEER_KEEPALIVE 1
18
#define NGX_PEER_NEXT 2
19
#define NGX_PEER_FAILED 4
20
21
22
typedef
struct
ngx_peer_connection_s
ngx_peer_connection_t
;
23
24
typedef
ngx_int_t
(*
ngx_event_get_peer_pt
)(
ngx_peer_connection_t
*pc,
25
void
*
data
);
26
typedef
void (*
ngx_event_free_peer_pt
)(
ngx_peer_connection_t
*pc,
void
*
data
,
27
ngx_uint_t
state);
28
#if (NGX_SSL)
29
30
typedef
ngx_int_t
(*ngx_event_set_peer_session_pt)(
ngx_peer_connection_t
*pc,
31
void
*
data
);
32
typedef
void (*ngx_event_save_peer_session_pt)(
ngx_peer_connection_t
*pc,
33
void
*
data
);
34
#endif
35
36
37
struct
ngx_peer_connection_s
{
38
ngx_connection_t
*
connection
;
39
40
struct
sockaddr
*
sockaddr
;
41
socklen_t
socklen
;
42
ngx_str_t
*
name
;
43
44
ngx_uint_t
tries
;
45
46
ngx_event_get_peer_pt
get
;
47
ngx_event_free_peer_pt
free
;
48
void
*
data
;
49
50
#if (NGX_SSL)
51
ngx_event_set_peer_session_pt set_session;
52
ngx_event_save_peer_session_pt save_session;
53
#endif
54
55
#if (NGX_THREADS)
56
ngx_atomic_t
*lock;
57
#endif
58
59
ngx_addr_t
*
local
;
60
61
int
rcvbuf
;
62
63
ngx_log_t
*
log
;
64
65
unsigned
cached
:1;
66
67
/* ngx_connection_log_error_e */
68
unsigned
log_error
:2;
69
};
70
71
72
ngx_int_t
ngx_event_connect_peer
(
ngx_peer_connection_t
*pc);
73
ngx_int_t
ngx_event_get_peer
(
ngx_peer_connection_t
*pc,
void
*data);
74
75
76
#endif
/* _NGX_EVENT_CONNECT_H_INCLUDED_ */
Generated on Sun Nov 10 2013 09:49:07 for Groonga 3.0.9 Source Code Document by
1.8.1.2