r5253: *** 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.5 2003/07/08 06:40:00 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    (format :initform :text :accessor listener-format :initarg :format)))
44
45 (defvar *active-listeners* nil
46     "List of active listeners")
47
48 (defclass worker ()
49   ((listener :initarg :listener :accessor listener :initform nil)
50    (connection :initarg :connection :accessor connection :initform nil)
51    (name :initarg :name :accessor name :initform nil)
52    (thread-fun :initarg :thread-fun :accessor thread-fun :initform nil)
53    (process :initarg :process :accessor process :initform nil)))
54
55