Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#502 closed enhancement (fixed)

in spiffy, make tcp-addresses configurable

Reported by: Jim Ursetto Owned by: sjamaan
Priority: minor Milestone: 4.9.0
Component: unknown Version: 4.6.x
Keywords: yep Cc:
Estimated difficulty:

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.

Attachments (1)

502.txt (2.1 KB) - added by Jim Ursetto 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by Jim Ursetto

Attachment: 502.txt added

comment:1 Changed 13 years ago by Jim Ursetto

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).

comment:2 Changed 13 years ago by sjamaan

Resolution: fixed
Status: newclosed

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

comment:3 Changed 13 years ago by felix winkelmann

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:4 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.