Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Does anyone know what POE's default Buffer size is and how one would reset it?

Replies are listed 'Best First'.
Re: POE Question
by BrowserUk (Patriarch) on Jul 08, 2004 at 21:55 UTC

    The default buffer size for reads is 64K. This is set in POE\Driver\SysRW.pm. There is a method to alter this.

    An instance of POE::Driver::SysRW is instantiated in both POE::Client::TCP and POE::Server::TCP and passed as a parameter to POE::Wheel::ReadWrite->new().

    I don't see any architected mechanism for gaining access to the POE::Driver::SysRW handle from user level code.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon
      Thanks, Maybe I just hack at poe to change it to a bigger buffer read size. I have to assume then that POE's write is to the length(buffer). Thanks for the info

        I'm assuming that this enquiry is related to this one?

        If so, I'm far from convinced that making the buffer bigger will help any with that problem. Maybe you should simply accumulate the reads untill you have as much as you need before sending it on?

        With respect to writing, the SysRW pod says this:

        =head1 DESIGN NOTES Driver::SysRW uses a queue of output messages. This means that BLOCK_SIZE is not used for writing. Rather, each message put() through the driver is written in its entirety (or not, if it fails). This often means more syswrite() calls than necessary, however it makes memory management much easier.

        It might be worth your time reading the POD of some of the inner classes. It might suggest better ways of achieving your goal.


        Examine what is said, not who speaks.
        "Efficiency is intelligent laziness." -David Dunham
        "Think for yourself!" - Abigail
        "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon