[fpc-devel] fcl-web: A proper way to set SO_REUSEADDR socket option in THTTPApplication

Vladimir Zhirov vvzh.lists at gmail.com
Fri Oct 14 20:07:17 CEST 2011


Thanks Michael and Andrew.

Michael Van Canneyt wrote:
> I plan a set of socket options in TSocketServer; 
> I have the same problem as you, I just need a free moment to
> implement it :-)

Great, then I'll wait for your implementation.

I've done some changes in my local copy to get things working
until better implementation is ready.
In case you are interested I'm attaching a diff of these changes
(sorry, they got mixed with my earlier patch for #20370)
 
> Configurable seems like the best option.

In the attached diff there is boolean ReuseAddress property
for TCustomHTTPApplication. The drawback of this approach is that
it's not uniform with TCustomFCgiApplication.ProtocolOptions
(serving the same purpose for FCGI application). The advantage
is that it does not declare new data structures and thus does
not force us to add more lower-level units into main program's
uses clause.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fclweb.diff
Type: text/x-patch
Size: 7700 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20111014/360dbe93/attachment.bin>


More information about the fpc-devel mailing list