in reply to maintain tcp socket
I implore you, don't take the easy or cheap way out. Do the networking stuff, properly! I've had to defend our network many, many, many times against programers who've not bothered to write the socket handling software correctly, then thought it was "the network's fault".
Tip 1: No, it's not ok to assume that you can create a connection and leave it up forever. We have to maintain the network, and failures can and do happen. You need to open the connection when you have traffic to send, and close it when you're done, then open it again when you have the next batch of stuff to send.
Tip 2: It's also not ok to assume that you'll never have to deal with a network failure. Most of the time the failure will be a failure to open the connection, but occasionally it will happen that you'll have to deal with the failure of an already open connection. Deal with those failures properly.
Tip 3: CPAN is your friend. There are lots of very smart people who've been down this road before, I'm sure there are modules on CPAN to make most of this pretty painless. Posting this question was also a good thing, I'm sure you'll find good examples of code from other monks who have experience doing this stuff.
I will thank you in advance for your Network Support group for your future attention to these details.
-Scott
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: maintain tcp socket
by Anonymous Monk on Apr 12, 2005 at 16:00 UTC | |
by 5mi11er (Deacon) on Apr 12, 2005 at 16:35 UTC |