Annotation of embedaddon/nginx/src/event/ngx_event_connect.h, revision 1.1

1.1     ! misho       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_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>