[comp.protocols.tcp-ip] Novice questions on TCP programming

pjs@euclid.jpl.nasa.gov (Peter Scott) (02/22/91)

I have just started programming in TCP and am up to my ears in
manuals.  I'm trying to get the basic concepts I need with the
aid of Douglas Comer's book, but it's hard to see the wood for
the trees; there's so much information there that I don't need,
it's hard to tell what I do need.

I have a simple application to complete: a server running on SunOS
catches binary records sent from a MicroVAX running Multinet on VMS,
which records are from a file on a machine available via DECNET to
the Microvax but not the Sun.  The idea is to mirror the file on the
Sun; hence I have a detached process on the MicroVAX checking it at
appropriate intervals.  I have been able to figure out how to
create sockets and make connections and have transferred data.  So
far so good.

The problems come in trying to handle failure modes, e.g., one machine
up, one down.  I haven't been able to find out what happens when the
VAX attempts a socket_write() but the Sun has gone down in the meantime;
is there a timeout for the write?  How long is it and how do I change it?
Or are there timeouts only on connect()s, and ditto?  Would I get
an ENXIO error if the write failed?  I'm trying to determine what's
fatal and what isn't, both when I'm trying to make a connection and
after it's been made; would any error on the write() call mean that
I'd have to go back to trying to reconnect?

I realize that I may be hopelessly lost; I've seen enough novice
questions in areas I do know something about to know what kinds of
mistakes can be made.  Thanks in advance.

-- 
This is news.  This is your       |    Peter Scott, NASA/JPL/Caltech
brain on news.  Any questions?    |    (pjs@euclid.jpl.nasa.gov)