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

JRC>
   >  JdeBP> You can then use DosDevIOCtl on that file handle to make
   >  JdeBP> adjustments to timeout and suchlike, and in turn spawn the BBS
   >  JdeBP> program.
   >
   >  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)?
JRC>

   Yes. The settings apply to the COM device itself, irrespective of the
   open file handle that is used to change them.  So if you change them in
   a child process, they will be changed for the parent as well.

JRC>
   >                                                             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.
JRC>

   It depends from what you want to do.  I implemented the XMODEM/SEALink
   file transfer protocol in one of my programs using read timeouts, 132
   character read buffers, and a single thread.  This uses the COM device
   driver itself for the XMODEM timeout processing.

   On the other hand, if I were writing a terminal emulator, I'd use a
   separate thread and an indefinite wait-for-something timeout for
   reading from the COM device, in order to make the thing as efficient as
   possible.

   > JdeBP <
___
 X MegaMail 2.10 #0:

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 50/99 54/99 270/101 620/243 625/0 160 640/201 711/401 409 410 413
SEEN-BY: 711/430 808 809 934 955 712/311 407 505 506 517 623 624 704 841
SEEN-BY: 713/317 800/1
@PATH: 440/4 141/209 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™.