For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > March 2004 > losing data on socket









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 losing data on socket
Vorxion

2004-03-28, 10:22 pm

I'm losing data on incoming sockets on a server written in perl.
I'm using IO::Socket, and I'm setting $server->autoflush(0) and
$server->blocking(0) as well as trying both $server->setbuf($main_buffer)
or $server->setvbuf($main_buffer,_IOFBF,102400000). I'm using IO::Select
to tell when I'm ready for reading on individual connections. $main_buffer
is a pure global in the main:: namspace.

Most telling, the length of $main_buffer never changes from 0. I have no
idea why. It acts like it's not being used.

I've read the docs, I've been beating myself over the head with this code
for a w. Someone have mercy on me and tell me how to keep from losing
the input? Please? I'm desperate at this point.

Same behaviour on perl 5.6.1 Solaris and 5.8.3 Linux. 5.8.0 on Solaris
actually silently dies when it hits the set[v]buf() command. :-/

Help? Please?

--
Vorxion - Member of The Vortexa Elite
Sponsored Links







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

Copyright 2008 codecomments.com