Yes, but you should be able to code it to push any conns into another thread
and let the listener go back to listening. Tell us what your reqt is and
we'll see if we can come up with a way to make it work.

/s.

-----------------------------------------------------------------------
Scott S. Goodwin
e: [EMAIL PROTECTED] | u: http://scottg.net
aim: scottgnet

----- Original Message -----
From: "David Walker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 27, 2002 2:15 PM
Subject: Re: [AOLSERVER] ns_socklistencallback


> Thanks Scott.
>
> Guess I expected too much from this command.  Apparently it can only
accept
> one connection at a time.
>
> On Sunday 24 November 2002 01:50 pm, Scott S. Goodwin wrote:
> > Here's a piece of test code I've used in the past:
> >
> > # This proc is run when a connection occurs
> >
> > proc handle_socklistencallback {rfd wfd} {
> >     ns_log notice "A client has connected to the socket"
> >     while {[set line [string trim [gets $rfd]]] != ""} {
> >         lappend headers $line
> >     }
> >     ns_log notice "CLIENT HTTP HEADERS:"
> >     ns_log notice "$headers"
> >
> >     set content_htm \
> > "<html>
> > <head>
> > <title>non-ssl test</title>
> > </head>
> > <body>
> > <p>Great! We were able to do a listen-callback on a socket,
> > read the client HTTP header and send back this HTML page. Hit the back
> > button to return to the test page.
> > <p>Here ar the HTTP client headers you sent me:
> > <p>$headers
> > </body>
> > </html>"
> >
> >     set myheader \
> >         "HTTP/1.0 200 Document follows
> > MIME-Version: 1.0
> > Content-Type: text/html
> > Content-Length: [string length $content_htm]"
> >
> >     puts $wfd \
> > "$myheader
> >
> >
> > $content_htm"
> >
> >     flush $wfd
> >     close $rfd
> >     close $wfd
> > }
> >
> > # This starts the listener on an address and port, and tells it
> > # what proc to run when a connection comes in
> >
> > ns_socklistencallback 192.168.0.2 8443 handle_socklistencallback
> >
> >
> > /s.
> >
> > -----------------------------------------------------------------------
> > Scott S. Goodwin
> > e: [EMAIL PROTECTED] | u: http://scottg.net
> > aim: scottgnet
> >
> >
> > ----- Original Message -----
> > From: "David Walker" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, November 24, 2002 10:23 AM
> > Subject: [AOLSERVER] ns_socklistencallback
> >
> > > does anyone have any ns_socklistencallback sample code?
>
>

Reply via email to