in reply to problem with sockets and CRLF and threads
This is likely the reason you lose data you are expecting at the server.
You probably need to change "while(<$session>)" to "while (my $msgout=<>)" in your "sub sock_io".
Also, I suggest you do a blocking accept in your server, to avoid the busy loop (Research on this left as an exercise).
"An undefined problem has an infinite number of solutions." - Robert A. Humphrey "If you're not part of the solution, you're part of the precipitate." - Henry J. Tillman
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: problem with sockets and CRLF and threads
by spx2 (Deacon) on May 25, 2007 at 23:27 UTC |