For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > June 2006 > TCP Buffering ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author TCP Buffering ?
lanas

2006-06-03, 10:10 pm

Hi folks,

Me again with one of those questions ... ;-)

When sending data using one of the TCP Components (eg. Client,
Server), is there some kind of internal buffering that's done ?

If I compare with the ACE framework, with ACE data can be queued
locally while waiting for the last TCP sending to be done. When the
sending is done, more data is then pumped through TCP, so on so forth.

Is this happening with POE's TCP ?

If not, and I'd like to implement this, how can I know that one of
these component is done transmitting TCP data so I can send more ?
What is the signal, variable to look for ?

Cheers,

Al
Rocco Caputo

2006-06-04, 7:20 pm

On Jun 3, 2006, at 21:26, lanas wrote:

> Hi folks,
>
> Me again with one of those questions ... ;-)
>
> When sending data using one of the TCP Components (eg. Client,
> Server), is there some kind of internal buffering that's done ?
>
> If I compare with the ACE framework, with ACE data can be queued
> locally while waiting for the last TCP sending to be done. When the
> sending is done, more data is then pumped through TCP, so on so forth.
>
> Is this happening with POE's TCP ?
>
> If not, and I'd like to implement this, how can I know that one of
> these component is done transmitting TCP data so I can send more ?
> What is the signal, variable to look for ?
>
> Cheers,
>
> Al


POE::Component::Server::TCP - The ClientFlushed callback is invoked
when all pending output has been flushed to the client.

POE::Component::Client::TCP - The ServerFlushed callback is invoked
when all pending output has been flushed to the server.

If you need better output flow control, consider writing a custom
client/server using POE::Wheel::ReadWrite. It has high- and low-
watermark events that can tell you when its output buffer approaches
"fullness" (high watermark), or is dangerously close to becoming
empty (low watermark). Or patch the components to expose the
appropriate callbacks.

--
Rocco Caputo - rcaputo@pobox.com


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com