Ah, thank you, Anton. I believe I understand now. I'll give it a shot and see what I can come up with.
Thanks, Jeremy On Thu, 17 Mar 2005 01:42:31 +1100, Anton Rolls <[EMAIL PROTECTED]> wrote: > > Ok, example: > > Open up a rebol console and type this: > > listen: open tcp://:4351 > wait listen conn: first listen > > Now open up a second rebol console and type: > > port: open tcp://127.0.0.1:4351 > > Back at the first console: > > type? conn ;== port! > conn/remote-ip ;== 127.0.0.1 > > So here is where you examine the remote-ip and decide whether to close > the port or not. > > Now, I've used words similar to those used in webserv.r, but here > is the line in the handle-new-connections function I think you need to > change: > > if error? try [ request: parse first (conn: first listen) none ] [ > close > conn return ] > > to: > > if error? try [ > conn: first listen ; conn is a port! > if conn/remote-ip <> 127.0.0.1 [make error! "Non-local > connection!"] > request: parse first conn none > ][close conn return] > > I haven't tested it, but that should work. > > Anton. -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
