Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!orion.oac.uci.edu!uci-ics!jarthur!jseidman From: jseidman@jarthur.Claremont.EDU (James Seidman) Newsgroups: comp.unix.questions Subject: Flushing sockets Message-ID: <4385@jarthur.Claremont.EDU> Date: 14 Feb 90 06:22:42 GMT Organization: Harvey Mudd College, Claremont, CA 91711 Lines: 13 I'm writing some socket code, and I need to make sure that a final message goes out before I disconnect. If I close the socket soon after writing the message, it often doesn't make it out. Putting in a sleep(1) between the write and the close fixes the problem, but since this one program serves several sockets, I don't want to do that. Is there an equivalent to fflush which works on sockets? My system has a man page for a routine called flush, but it appears to be only for assembly language routines. -- ------------------------------------------------------------------------------- Jim Seidman, Harvey Mudd College, Claremont, CA 91711. (714) 621-8000 x2026 DISCLAIMER: I don't even know if these are opinions, let alone those of anyone other than me.