Detecting unexpectedly closed sockets
alex at tweedly.net
Sun Oct 17 07:11:22 EDT 2004
At 11:32 17/10/2004 +0200, Tomas Franzén wrote:
>>Finally, always keep your keep alive packets to a size small enough to
>>fit into one single ethernet packet. Don't exceed that length for
>>something as simple as a keep alive.
>As you can see, my requests are not very small. A keep-alive might look
>like this, I suppose:
>Will this fit into a single ethernet packet? I don't know much about this
>kind of lower level stuff.
Yes, that should be OK. You can reasonably assume that an ethernet packet
can hold at least 576 bytes. You use up 20 for UDP/IP headers, or 40 for
TCP/IP, and you can use up a few more on obscure lower level stuff. It's
pretty safe to assume 500 bytes of application payload.
>>Ah, network protocol design, fun stuff.
>In my situation, I use two kinds of clients, the 'master' (teacher), and
>the 'client' (student), and both connect to the main server, which keeps
>track of who is online. Also, the student is a server, too, responding to
>commands from the master. Ah, tricky stuff.
And presumably the student can ask a question - which means (in network
terms) the teacher client must respond to something initiated by the
student. So you get all the complexities of peer-peer.
Have fun ...
More information about the Use-livecode