Changeset 15509 in project


Ignore:
Timestamp:
08/17/09 22:28:58 (10 years ago)
Author:
sjamaan
Message:

Implement bind-address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/spiffy/trunk/spiffy.scm

    r15508 r15509  
    4343   current-request remote-address local-address
    4444   current-response current-file current-pathinfo
    45    server-software root-path server-port server-ssl-context server-root-uri
    46    index-files mime-type-map default-mime-type file-extension-handlers
     45   server-software root-path server-port server-ssl-context
     46   server-bind-address server-root-uri index-files
     47   mime-type-map default-mime-type file-extension-handlers
    4748   default-host vhost-map access-log error-log debug-log
    4849   spiffy-user spiffy-group access-file max-connections
     
    5859
    5960;;; Request processing information
    60 (define current-request    (make-parameter #f))
    61 (define current-response   (make-parameter #f))
    62 (define current-file       (make-parameter #f))
    63 (define current-pathinfo   (make-parameter #f))
    64 (define local-address      (make-parameter #f))
    65 (define remote-address     (make-parameter #f))
     61(define current-request     (make-parameter #f))
     62(define current-response    (make-parameter #f))
     63(define current-file        (make-parameter #f))
     64(define current-pathinfo    (make-parameter #f))
     65(define local-address       (make-parameter #f))
     66(define remote-address      (make-parameter #f))
    6667
    6768;;; Configuration
    68 (define server-software    (make-parameter `(("Spiffy"
    69                                               ,(conc version "." release)
    70                                               ,(conc "Running on Chicken "
    71                                                      (chicken-version))))))
    72 (define root-path          (make-parameter "./web"))
    73 (define server-port        (make-parameter 8080))
    74 (define server-ssl-context (make-parameter #f))
    75 (define index-files        (make-parameter '("index.html" "index.xhtml")))
     69(define server-software     (make-parameter `(("Spiffy"
     70                                               ,(conc version "." release)
     71                                               ,(conc "Running on Chicken "
     72                                                      (chicken-version))))))
     73(define root-path           (make-parameter "./web"))
     74(define server-port         (make-parameter 8080))
     75(define server-ssl-context  (make-parameter #f))
     76(define server-bind-address (make-parameter #f))
     77(define index-files         (make-parameter '("index.html" "index.xhtml")))
    7678(define mime-type-map
    7779  (make-parameter
     
    431433(define (start-server #!key
    432434                      (port (server-port))
    433                       (ssl-context (server-ssl-context)))
     435                      (ssl-context (server-ssl-context))
     436                      (bind-address (server-bind-address)))
    434437  (parameterize ((load-verbose #f))
    435438    (letrec ((thread-count (make-mutex/value 'thread-count 0))
    436439             (listener (if ssl-context
    437                            (ssl-listen port 4 #f ssl-context)
    438                            (tcp-listen port)))
     440                           (ssl-listen port 4 bind-address ssl-context)
     441                           (tcp-listen port 10 bind-address)))
    439442             (accept-next-connection
    440443              (lambda ()
Note: See TracChangeset for help on using the changeset viewer.