TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jonathan de Boyne Pollard
from: James R. Cook
date: 1997-01-11 01:15:46
subject: DosRead blocking

-=> Quoting Jonathan de Boyne Pollard to James R. Cook <=-



 > Okie.  I assume that after I fiddle with the settings, I should probably

 > set them back the way I got them (when my proggie exits)?



 JdBP> Yes. The settings apply to the COM device itself, irrespective of

 JdBP> the open file handle that is used to change them.  So if you change

 JdBP> them in a child process, they will be changed for the parent as

 JdBP> well.



 That's what I figured.  Hmmm.



 > Also, should

 > I worry with setting up a thread to handle the I/O or just let OS/2 buffe

 > it.  I've been going round and round with that and I can't see much

 > benefit in buffering it myself.



 JdBP> On the other hand, if I were writing a terminal emulator, I'd use a

 JdBP> separate thread and an indefinite wait-for-something timeout for

 JdBP> reading from the COM device, in order to make the thing as

 JdBP> efficient as possible.



 Okay.  Perhaps some background on what I'm doing would help.  It's a mini

 sort of BBS.  It sits between my mailer and my BBS and routes calls to

 the BBS, a telnet proggie and a download area (subscription info).  Not

 a really huge thing.  (Not yet anyway.)  I can't get a decent enough handle

 on the comm end of things to set it all straight in my brain.  See, I've

 added some complexity that I want the output stream massaged so that ASCII

 callers don't get all the ANSI crap and that variables like {at}TIME{at} get

 replaced properly.  :(  This is getting beyond my grasp I think.



 ={) James (}=



--- Blue Wave/DOS v2.30

* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 50/99 54/99 270/101 620/243 625/0 160 711/401 409 410 413 430 808
SEEN-BY: 711/809 934 955 712/311 407 505 506 517 623 624 704 841 713/317
SEEN-BY: 800/1
@PATH: 106/2000 396/1 270/101 712/624 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.