Thanks, this worked... Although strangely when I had been experimenting 
trying to figure this out on my own I kept seeing 'none as the value for 
port/host.  Must have just been a glitch on my system that night...

Anyway, now that this is working I was able to add logging to the server.  
The current version (available in the web section on rebol.org) creates logs 
in the Extended Common Log format.  Unfortunatly I don't have any programs 
to intrepret webserver logs so I can't really test to see if the logs are 
REALLY formatted correctly.  So if anybody out there can check this I'd 
appreciate it..

- Cal Dixon ([EMAIL PROTECTED])

-><-


>From: [EMAIL PROTECTED]
>Subject: [REBOL] obtaining IP address of incoming connection Re:
>Date: Fri, 25 Feb 2000 9:20:45 -0800
>
>Hi Cal
>
>I modified one of the web-servers on the REBOL site, to write the browser
>IPs to the console. A couple of snippets should be enough to get you going.
>
>  listen-port: open/lines tcp://:8080  ; port used for web connections
>...
>  http-port: first wait listen-port
>       request: first http-port
>...
>  send-page: func [data mime] [
>       insert data rejoin ["HTTP/1.0 200 OK^/Content-type: " mime "^/^/"]
>       write-io http-port data length? data
>   print [now http-port/host length? data http-port/port-id]
>    ]
>
>So after we have an active connection in http-port, properties at browser
>end are found in http-port object: the browser IP is http-port/host and the
>connection IP is in http-port/port-id. You can also do a reverse dns 
>look-up
>on the host IP and log the domain-name if desired.
>
>Hope this helps
>
>Larry

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Reply via email to