Your client is treating the connection as a stream (by using POE::Filter::Stream to interpret the data). It seems to me that the server should be doing the same.
Are your sure your sysread() read everything?
Have you tried printing the length() of what you're sending and receiving? When I do that here, I get:
% perl perlmonks-701147-server.pl got a connection from 127.0.0.1 sending 21097and
% perl perlmonks-701147-client.pl sending request on localhost:12345 ... input size: 21099The client receives 2 additional characters: carriage return, and linefeed. The default server-side POE::Filter::Line adds them, and the client-side POE::Filter::Stream doesn't remove them.
If you're still having problems, maybe you're running an old version of POE? I can't reproduce the error with your test case, so something must be outdated or different between our systems.
In reply to Re: sending data over TCP channel using POE::Component::Server::TCP
by rcaputo
in thread sending data over TCP channel using POE::Component::Server::TCP
by cta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |