art@dinorah.wustl.edu (Arthur B. Smith) (06/24/89)
Hi! We are trying to do stream i/o (stdio.h stuff) over stream type sockets in the internet address family (instead of the more conventional (normal or character special) files or pipes), in Ultrix 3.0, and are having some problems. We have not tried this under any other operating systems. We are constructing the FILE * stream by calling fdopen on the socket descriptor. The Ultrix documentation says that fdopen can be applied to descriptors obtained from open, dup, creat or pipe. Sockets are not mentioned as being either allowed or disallowed. Fdopen returns non-NULL, so it presumably is succeeding, but subsequent fprintf's seem to be failing. Does anyone know for sure if we can or can't do what we are trying to do? Since stream type sockets support the read, write and close system calls, one would expect most operations to work. Sockets DO return errors to fstat calls, though, so any operation that insists on checking the descriptor's status could fail. Any help will be greatly appreciated. Please respond by e-mail, and I fill forward responses to any who request them. I will post a summary if the need seems to demand it. Thanks in advance! -art smith (art@dinorah.wustl.edu or ...!uunet!wucs1!dinorah!art)