note
jepri
You need to 'accept' the socket. The old socket is then reused:<P><code>
print "Incoming connection detected!\n";
my $new_sock = $listen_sock->accept
or die "Could not accept socket: $!";
</code>
<P>
then you should do a <P>
<code>
recv $new_sock,$z,10000,0;
</code>
<P>
to read from your socket. [tye] will tell you that <code><SOCKET></code> is bad, mmmmkay?<P>
Sorry.. too tipsy to do more than cut and paste from my own code.
<P>
As near as I can tell 'accept' clones the socket, then goes back to listening on the old one. If anyone here would care to explain...<P>
The docs are pretty short on this operation. Going through other people's code is the best way in this case.
<p><A HREF="/index.pl?node=Tk%20app%20to%20show%20the%20computers%20you%20are%20connecting%20to&lastnode_id=1072">_</A><A HREF="/index.pl?node=ForkMe&lastnode_id=1072">_</A>__________________<BR>
Jeremy<BR>
I didn't believe in evil until I dated it.
137098
137098