Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: TCP client buffering problemsby BrowserUk (Patriarch) |
on Oct 14, 2011 at 01:57 UTC ( [id://931414]=note: print w/replies, xml ) | Need Help?? |
I seriously doubt you will get a helpful response to your question. What you have posted is far to "mocked up" and "simplified" for anyone to be able to guess what you are actually doing. Simple example. You say:
But looking at the snippets you've posted, the first thing I notice is that the print statement that would be producing that response: trace is print "resp: $responseData\n";, making your "actual output" nothing of the kind. In addition, the logic of your sub:
is such that there should be no way for your sends and receives to get out of sync as you follow each transmission with a blocking read. Unless of course you have set the socket to be non-blocking, in which case, you should not be using the line-oriented diamond operator. Add to that this line:
which suggests that you think you are writing OO code but obviously are not, and that you are relying upon globals vars to convey data between subroutines, and it suggests that you have one unholy mess on your hands. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|