I'm not all that good with sockets, and I've got to support this legacy
code. The program compiles and runs fine under RedHat 5.2, but when
compiled under RedHat 6.2, it pops errors during transmissions over the
I believe I've isolated the problem to write(2) in one of the sources.
nbytes = write((*association)->networkSpecific.TCP.socket,
pdu->presentationDataValue.length - 2);
if ((unsigned long) nbytes != pdu->presentationDataValue.length - 2)
The problem is that write() returns a value not equal to the supplied
length, and pops an errno of EINPROGRESS. Now, how do I wait until it has
actually completed, and know if it did it successfully? I'm supposing I
should do something with select(2).