From: Sam S. <sd...@gn...> - 2004-12-13 16:39:25
|
> * John K. Hinsdale <uva@nyzn.pbz> [2004-12-13 11:00:33 -0500]: > > > I think you will get what you want if you call SOCKET-SERVER on a > > socket connected to localhost. > > Sam -- I don't believe this is accurate. I glanced at the socket > interface source for CLISP and the setting up of the TCP port listened > on, as well as the "local listen address" (which Adam wants to > control) must be done at the same time, via the sys call "bind()" > according to the rules of TCP. look at socket.d:create_server_socket() when socket is valid, its peer is used for bind. so, (with-open-stream (s (socket-connect 21)) (socket-server s)) should return what Adam wanted (if there is a local telnet server). > If desired I could see if I can add this quickly. What is needed is > this optional parameter and, when it is given, the ability to > substitute in place of the hardcoded "0.0.0.0" which appears in the > CLISP code in src/socket.d ... please go ahead. -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> Let us remember that ours is a nation of lawyers and order. |