diff src/core/ngx_listen.h @ 3:34a521b1a148

nginx-0.0.1-2002-08-20-18:48:28 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 20 Aug 2002 14:48:28 +0000
parents 4eff17414a43
children 669801705ab1
line wrap: on
line diff
--- a/src/core/ngx_listen.h
+++ b/src/core/ngx_listen.h
@@ -2,8 +2,40 @@
 #define _NGX_LISTEN_H_INCLUDED_
 
 
-ngx_socket_t ngx_listen(struct sockaddr *addr, int backlog,
-                        ngx_log_t *log, char *addr_text);
+#include <ngx_config.h>
+#include <ngx_log.h>
+#include <ngx_types.h>
+#include <ngx_socket.h>
+#include <ngx_connection.h>
+
+typedef struct {
+    ngx_socket_t  fd;
+
+    void         *addr;
+    size_t        addr_len;
+    char         *addr_text;
+
+    int           family;
+    int           type;
+    int           protocol;
+
+    ngx_log_t    *log;
+    void         *server;
+    int         (*handler)(ngx_connection_t *c);
+
+    int           backlog;
+
+    unsigned      done:1;
+    unsigned      close:1;
+    unsigned      nonblocking:1;
+#if 0
+    unsigned      overlapped:1;
+#endif
+    unsigned      shared:1;          /* shared between threads or processes */
+#if (HAVE_DEFERRED_ACCEPT)
+    unsigned      deferred_accept:1;
+#endif
+} ngx_listen_t;
 
 
 #endif /* _NGX_LISTEN_H_INCLUDED_ */