You just delete your readwrite wheel after all the data is flushed.
David
On 8/1/05, mail@xxxxxxxxx <mail@xxxxxxxxx> wrote:
>
> O.K.
> And how to disconnect the client if the connection is made through
> POE::Wheel::SocketFactory.I thik there is no shutdown method there.
> Pl. reply I shall be very grateful.
> --
> Regards
> Abhishek jain
>
> Original Message:
> -----------------
> From: Rocco Caputo rcaputo@xxxxxxxxx
> Date: Fri, 29 Jul 2005 22:19:35 -0400
> To: poe@xxxxxxxx
> Subject: Re: How to disconnect the client or when to know that the
> conversation is complete
>
>
> On Fri, Jul 29, 2005 at 09:56:06PM +0530, Abhishek Jain wrote:
> > The server on successful connection by a client sends a welcome
> > message . Client sends a request and server responds and immediately
> > after that the conversation must stop.
>
> 1. Client connects.
> 2. Server says hello.
> 3. Client sends request.
> 4. Server sends response.
> 5. Server closes connection after response is flushed.
>
> > I have tried writing $_[KERNEL]->yield("shutdown") code in the
> > ServerFlushed but the control perhaps do not passes to this function
> > .
>
> The steps above show that the server must initiate the disconnection
> after the response is sent. The server does not have a ServerFlushed
> callback. Rather, it has a ClientFlushed, but you should not need to
> use it in most cases.
>
> POE::Component::Server::TCP contains logic to automatically delay the
> shutdown until all buffered output is flushed. Therefore you may call
> $_[KERNEL]->yield("shutdown") immediately after sending the response
> in #4. The server component will ensure the response is sent.
>
> > Also i would like to see suggestions that whether this server can
> > handle multiple simultaneous connections from many different
> > clients.
>
> POE::Component::Server::TCP handles multiple concurrent connections.
>
> --
> Rocco Caputo - http://poe.perl.org/
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
>
>
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|