r5239: *** 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.4 2003/07/05 22:54: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   ((process :initarg process :accessor process)
33    (socket :initarg socket :accessor socket)
34    (workers :initform nil :accessor workers
35             :documentation "list of worker threads")))
36
37 (defvar *active-listeners* nil
38     "List of active listeners")
39
40 (defclass worker ()
41   ((listener :initarg :listener :accessor listener :initform nil)
42    (name :initarg :name :accessor name :initform nil)
43    (func :initarg :func :accessor func :initform nil)
44    (function-args :initarg :function-args :accessor function-args
45                   :initform nil)
46    (socket :initarg :socket :accessor socket :initform nil)
47    (thread-fun :initarg :thread-fun :accessor thread-fun :initform nil)
48    (process :initarg :process :accessor process :initform nil)))
49
50