ericf706 has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I am trying to write a script that will open a socket and accept a connection from a client.
I have two questions though:
1) The first 4 bytes of the messege will indicate the size of the messege being received. How would I ensure that I have received the entire messege?
2) How would I detect a half-open connection? (The client has closed its side of the connection, but the server considers the connection to still be open)
I'm fairly new to programming perl, and socket programming in general, any help would be appreciated, thanks.