Changeset 1092

Show
Ignore:
Timestamp:
06/16/08 21:36:22 (3 months ago)
Author:
kris
Message:

moved closure of the connected socket from HttpBridge? to HttpServer? instead, and added a means of disabling the detach() call

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/mango/net/http/server/HttpBridge.d

    r1039 r1092  
    9393 
    9494                // close and destroy this conduit (socket) 
    95                 scope (exit) 
    96                        conduit.detach; 
     95                //scope (exit) 
     96                       //conduit.detach; 
    9797 
    9898                // reset the (probably overridden) input and output 
  • trunk/mango/net/http/server/HttpServer.d

    r1083 r1092  
    4040{ 
    4141        private ServiceProvider provider; 
     42        private bool            close = true; 
    4243 
    4344        /********************************************************************** 
     
    8384        { 
    8485                return "http"; 
     86        } 
     87 
     88        /********************************************************************** 
     89 
     90                Configure whether each connection is detached after being 
     91                serviced. The default behaviour is to close the connection 
     92 
     93        **********************************************************************/ 
     94 
     95        void detach (bool yes) 
     96        { 
     97                this.close = yes; 
    8598        } 
    8699 
     
    138151                ServiceBridge   bridge; 
    139152 
     153                scope (exit) 
     154                       if (close) 
     155                           conduit.detach; 
     156 
    140157                // we know what this is because we created it (above) 
    141158                thread = cast(HttpThread) st;