home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / question / 16003 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.3 KB

  1. Xref: sparky comp.unix.questions:16003 comp.unix.internals:2172
  2. Path: sparky!uunet!ulowell!m2c!bu.edu!cs!tasos
  3. From: tasos@cs.bu.edu (Anastasios Kotsikonas)
  4. Newsgroups: comp.unix.questions,comp.unix.internals
  5. Subject: sockets and prob. writing to stdout
  6. Message-ID: <108357@bu.edu>
  7. Date: 26 Jan 93 23:01:06 GMT
  8. Sender: news@bu.edu
  9. Followup-To: comp.unix.questions
  10. Organization: Computer Science Department, Boston University, Boston, MA, USA
  11. Lines: 21
  12. Originator: tasos@cs
  13.  
  14.  
  15. Hi,
  16. I have written my own server/client protocol and basically each server
  17. response to a client request tells the client how many bytes the server
  18. is sending over, so the client can count and verify that it received everyting.
  19.  
  20. The client then writes out to stdout all bytes received. The problem is that
  21. with some terminal settings (like when over a modem line, or when running
  22. xterm rsh'ed to another host in the background) parts of the text are
  23. missing. If output is redirected to a file, the file is complete.
  24.  
  25. Has anyone seen this before? Any suggestions to the cause? Solutions? 
  26. Should the client do an fflush() after each write() to stdout? Is there
  27. any ioctl() call that will "sunchronize" the tty (whatever that means)?
  28.  
  29. Mind you that I can use telnet instead of the client and that works ok,
  30. so I am wondering what telnet does.
  31.  
  32. Any information will be greatly appreciated.
  33.  
  34. Tasos
  35.