[Info-vax] yet another sys$qiow question
JF Mezei
jfmezei.spamnot at vaxination.ca
Wed Aug 12 20:35:16 EDT 2015
On 15-08-12 18:27, kc at kayceesoftware.com wrote:
> The next project requires use of socket ports and changing this recent card reader app to use sockets makes sense
Yes,. But remember that the IP drivers lack many functions available on
the terminal driver, most notably the SS$M_TIMEOUT that cancels an IO
after X seconds of not receiving the data. You now have to roll your own
implementation with even flags for both the IO and the timer and makes
for far less clean code.
If you use the C routines for the IP stack (unix socket stuff) then of
course you have no access to timeout stuff. Makes it harder for a
program to be robust when soemthing goes wrong on the link or the remote
device and it fails to receive enough data to end the IO.
That is my biggest beef with the IP stack. the TIMMEOUT made for really
neat AST driven code for terminal driver and as I recall the DECNET
driver too (not sure I recall). moving to the IP stack made for ugly code.
Also, remember that with socketsm you have no garantee that code arrives
in a single packet, so you have to have code that assembles paclets into
a single buffer until you are satisfied the buffer is full.
More information about the Info-vax
mailing list