On Wed, 3 Mar 2010 17:13:39 +0100
"Winfried Neessen" <nees...@cleverbridge.com> wrote:

> Hi Martijn,
> 
> > The solution to this is to write a custom filter that makes sure the
> > entire packet (your auth string/length/data) is read in before it
> > passes this on to your app.
> >
> thanks for your reply. I build a customer filter based on the concept
> of Filter::Stream. When I put some logging into the get_one()
> function e. g. I see that when the windows client sends it stream,
> this function may be called 2 to 4 times. My problem now is (and I
> bet it's most likely an error in reasoning on my side) how to figure
> out, when the stream from the client finally ended. When I would be
> able to figure this out, I could collect the data of the single
> get_one() calls and concat them.
> 
> Any ideas on how to build such a logic or do you even have suggestions
> on how to build this in a better way?
> 
> 
> Thanks
> Winni
> 
> 


The successful way to write filters is to define and adhere to a
protocol. The point of a filter is to take line noise and turn it into
useful bits. This means that you need to get your other end to tell you
exactly what they are doing. Do the messages have a terminator? Are
they fixed length? etc.

-- 

Nicholas Perez
XMPP/Email: n...@nickandperla.net
http://search.cpan.org/~nperez/
http://github.com/nperez

Reply via email to