From: Sam S. <sd...@gn...> - 2004-12-13 14:59:04
|
> * Adam Warner <yv...@pb...> [2004-12-13 19:07:58 +1300]: > > Am I misreading the implementation notes or is there no way to bind a > server socket solely to localhost (so the server is only accessible to > clients running on the local computer?) > > (SOCKET:SOCKET-SERVER &OPTIONAL [port-or-socket]) > This function creates a socket an binds a port to the socket. The > server exists to watch for client connect attempts. The optional > argument is either a port (positive FIXNUM) or a SOCKET:SOCKET-STREAM > (from whose peer the connections will be made). I think you will get what you want if you call SOCKET-SERVER on a socket connected to localhost. > I suggest the interface should be: > (SOCKET:SOCKET-SERVER &OPTIONAL [port-or-socket] [host]) > > Where a [host] of NIL binds to all network interfaces (thus being > backwards compatible) and a supplied [host] only binds to the designated > network interface (usually localhost/127.0.0.1 or the hostname). <http://www.cygwin.com/acronyms/#PTC> <http://www.cygwin.com/acronyms/#SHTDI> -- 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> Lisp: its not just for geniuses anymore. |