From: Jeff R. <dv...@di...> - 2012-08-13 18:17:36
|
Frédéric Bonnet wrote: [lots of interesting stuff cut] > That being said, there is a life beyond TCP and UDP. There is a protocol > coming from the Telco industry that's gaining traction nowadays : SCTP. > Linux already has kernel support for it, and an API is coming for Java > 7. I was aware of SCTP, but I thought it was still at an academic stage. It's useful to know that there are real-world examples of stuff we can't handle yet, and good reasons why we should handle them. > Note that it sends & receives messages using single puts & read, as > required by TclUDP. So sent messages are given as single pre-built > strings. (see proc notify), here as HTTP over UDP messages. This isn't a > problem for simple protocols like SSDP but may become one in other > cases, I don't know. Anyway this need for atomic read/write need not be. How does TclUDP handle attempted uses outside of what you should do, but the core commands will allow? In particular, [gets], [read $chan N] (for values of N that are less than the amount of data available) and [puts $chan $data] where data is larger than the largest allowable size for your medium. In my own attempts I found these clumsy to deal with but impossible to ignore. You mentioned that the user needs to take care about too large a [puts] lest it generate a flush and a second write. I think this is too serious a potential problem to leave as a documentation warning rather than an error condition. -J |