Hi
I have two problems.
First, there's a common socket. How can i test in perl, if a socket is
closed (tcp)? Is there a function for it. I've read the manual, but i found
nothing.
The second:
I have an opened socket, connected to a server (tcp). It sends something
like:
socket(CGSPSERVER, AF_INET, SOCK_STREAM, $proto) || die;
my $oldfh = select(CGSPSERVER); $| = 1; select($oldfh);
if (!connect(CGSPSERVER,$sock_peer)) { die; };
send(CGSPSERVER,$ipc_cmd1,0);
and want to receive an answer:
while ($line = <CGSPSERVER>)
{
push(@answer, $line);
}
But it doesn't work, and a don't know why. The same server with other
clients works (it sends back a text). What can be the problem?
in advance
Thanks for your help
Hodossy