in reply to IO Socket buffer flushing
One quick thing to try is put newlines into all syswrites, like
Another thing to try is using select ( or IO::Select) on the socket filehandles. That way you can do the read in a $select->can_read loop, which will keep the deadlock from occurring. Google for numerous Perl socket examples, like "perl socket IO::Select".# syswrite($new_sock, $buf, 10); syswrite( $new_sock , "$buf\n\n", 10);
Also see the perl socket examples a basic socket tutorial
|
|---|