File: neo_server.h

package info (click to toggle)
clearsilver 0.10.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,304 kB
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 589; perl: 120; lisp: 34; sql: 21
file content (48 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Copyright 2001-2004 Brandon Long
 * All Rights Reserved.
 *
 * ClearSilver Templating System
 *
 * This code is made available under the terms of the ClearSilver License.
 * http://www.clearsilver.net/license.hdf
 *
 */

#ifndef __NEO_SERVER_H_
#define __NEO_SERVER_H_ 1

__BEGIN_DECLS

/* hmm, this callback might need a mechanism for telling the child to
 * end... */
typedef NEOERR *(*NSERVER_REQ_CB)(void *rock, int num, NSOCK *sock);
typedef NEOERR *(*NSERVER_CB)(void *rock, int num);

typedef struct _nserver {
  /* callbacks */
  NSERVER_CB init_cb;
  NSERVER_REQ_CB req_cb;
  NSERVER_CB clean_cb;

  void *data;

  int num_children;
  int num_requests;

  int port;
  int conn_timeout;
  int data_timeout;

  char lockfile[_POSIX_PATH_MAX];

  /* Internal data */
  int accept_lock;
  int server_fd;
} NSERVER;

NEOERR *nserver_proc_start(NSERVER *server, BOOL debug);

__END_DECLS

#endif /* __NEO_SERVER_H_ */