FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HTTP Server Patch Proposal

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Mon Feb 26, 2007 10:54 pm    Post subject: HTTP Server Patch Proposal Reply with quote

I hereby propose the follow patch for HttpServer:

Code:
Index: mango/net/http/server/HttpServer.d
===================================================================
--- mango/net/http/server/HttpServer.d  (revision 948)
+++ mango/net/http/server/HttpServer.d  (working copy)
@@ -103,7 +103,11 @@

         override ServerSocket createSocket (InternetAddress bind, int backlog)
         {
-                return new ServerSocket (bind, backlog);
+               debug {
+                       return new ServerSocket (bind, backlog, true);
+               } else {
+                       return new ServerSocket (bind, backlog);
+               }
         }

         /**********************************************************************


Rationale: When debugging, one is frequently improperly stopping and starting the server and I'm sick of waiting for the server socket to time out!

If not this, a specific version would also do the job- debug just seems right to me.
Back to top
View user's profile Send private message Send e-mail AIM Address
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Feb 27, 2007 2:05 am    Post subject: Reply with quote

hehe -- yeah, that's a PITA
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Feb 27, 2007 2:39 am    Post subject: Reply with quote

Added a 'reuse' parameter in strategic places, so you can control the behaviour yourself. Checked-in
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group