r5258: *** empty log message ***
[cl-modlisp.git] / variables.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: modlisp -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          base.lisp
6 ;;;; Purpose:       Base data and functions for modlisp package
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Dec 2002
9 ;;;;
10 ;;;; $Id: variables.lisp,v 1.6 2003/07/08 14:00:53 kevin Exp $
11 ;;;; *************************************************************************
12
13 (in-package #:modlisp)
14
15 (defvar *listener-count* 0
16   "used to name listeners")
17
18 (defvar *worker-count* 0
19   "used to name workers")
20
21 (defconstant +default-apache-port+ 20123
22   "Default port for listen")
23
24 (defvar *apache-socket* nil
25   "the socket stream to apache")
26
27 (defvar *number-server-requests* 0)
28 (defvar *number-worker-requests* 0)
29 (defvar *close-apache-socket* t)
30
31 (defclass listener ()
32   ((port :initarg :port :accessor port) 
33    (function :initarg :function :accessor listener-function
34              :initform nil)
35    (function-args :initarg :function-args :accessor function-args
36                   :initform nil)
37    (process :initarg :process :accessor process)
38    (socket :initarg :socket :accessor socket)
39    (workers :initform nil :accessor workers
40             :documentation "list of worker threads")
41    (name :initform "" :accessor name :initarg :name)
42    (wait :initform nil :accessor wait :initarg :wait)
43    (catch-errors :initform nil :accessor catch-errors :initarg :catch-errors)
44    (format :initform :text :accessor listener-format :initarg :format)))
45
46 (defvar *active-listeners* nil
47     "List of active listeners")
48
49 (defclass worker ()
50   ((listener :initarg :listener :accessor listener :initform nil)
51    (connection :initarg :connection :accessor connection :initform nil)
52    (name :initarg :name :accessor name :initform nil)
53    (thread-fun :initarg :thread-fun :accessor thread-fun :initform nil)
54    (process :initarg :process :accessor process :initform nil)))
55
56