Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!kddlab!atrpost!atr-la!alain From: alain@atr-la.atr.co.jp (Alain de Cheveigne) Newsgroups: comp.sys.mac.programmer Subject: Re: FSRead hangs on the serial driver Message-ID: <3915@atr-la.atr.co.jp> Date: 11 Jan 90 08:24:59 GMT References: <7770@unix.SRI.COM> <4713@hydra.gatech.EDU <6113@internal.Apple.COM> Organization: ATR International,Japan Lines: 27 In-reply-to: chesley@goofy.apple.com's message of 11 Jan 90 01:26:52 GMT In article <6113@internal.Apple.COM>, chesley@goofy.apple.com (Harry Chesley)writes: >The default input buffer for the serial port is only 64 bytes. >So 80 characters can easily overflow the buffer if you don't read it out >fast. You can increase the buffer size by calling SerSetBuf (but be sure >and unset the buffer by calling SerSetBuf with a length of zero before >exiting the application or you'll get horrible crashes). I currently use a 8172 byte buffer, and I don't unset the buffer on exit. I have never witnessed such a crash. While the subject is up: even with a 8172 byte buffer I sometimes lose characters. It seems that the ethernet pad I'm connected to takes too long to react to an XOFF. The question is: at what point does the serial driver send the XOFF? When a given *proportion* of the buffer is full? Or when the buffer is a given *number of bytes* from being full? If it is the latter, making the buffer bigger only reduces (slightly) the probability of losing characters. Alain de Cheveigne, alain@atr-la.atr.co.jp