Summary

in spiffy, make tcp-addresses configurable

Metadata

Attachments

Description

spiffy has only one dependency on the core tcp unit -- tcp-addresses. Both the listen procedure and the accept procedure can be passed to start-server via keywords, but the procedure used to resolve the local and remote addresses from an input port cannot. By making tcp-addresses configurable in this manner, dirty and unscalable hack though it be, spiffy can be used with the tcp6 egg like so:

 (use tcp6)
 (start-server accept: tcp-accept listen: tcp-listen addresses: tcp-addresses)

Attached is one possible implementation. Interestingly, you could now remove the ssl-specific addresses code (essentially: (tcp-addresses (ssl-port->tcp-port p))) from spiffy and move it into, e.g. ssl-addresses in the openssl egg, but this is not really practical.

Changes and comments

[2011-02-14 04:25:40 UTC] zbigniew attached 502.txt (description=#f)

[2011-02-14 08:20:10 UTC] zbigniew wrote:

Maybe it's not the ugliest hack in the world, since the tcp-server egg uses the same method (but with parameters). The parameter is called (tcp-server-get-addresses-procedure).

[2011-02-14 09:30:21 UTC] sjamaan changed status from new to closed

[2011-02-14 09:30:21 UTC] sjamaan set resolution to fixed

[2011-02-14 09:30:21 UTC] sjamaan wrote:

It's applied. Thanks for the patch, Jim!

[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0

[2011-06-01 09:00:41 UTC] felix wrote:

Milestone 4.7.0 deleted

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted