server.pl
while ( defined ($response = <CLIENT>)){ ...client.pl
while ($line = <SOCKET>) { print SOCKET "Client says hellooooo toooo !!!"; SOCKET->autoflush(); ...
One problem is that you're trying to read lines on the server side with <...> (aka readline), but on the client side you're not writing any newlines... The effect of this is that the server hangs in $response = <CLIENT> waiting for a newline.
Note that flushing and a communication protocol involving newlines are two different things. In other words, flushing some output does not add a newline.
P.S.: SOCKET->autoflush sets an operation mode of the handle - as opposed to SOCKET->flush - so the former needs to be called only once.
In reply to Re: Socket deadlock doubt in code
by almut
in thread Socket deadlock doubt in code
by sajanagr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |