TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Rob Basler
date: 1998-09-23 09:59:16
subject: Named Pipe Question

I am writing a named pipe server app.  I have a pipe with a number of
threads servicing a byte mode blocking pipe.  The problem I am having is
that I want to be able to end any of the threads, problem is that
DosConnectNPipe waits indefinitely (no timeout option) so there isn't any
easy way to cleanly end a thread that is waiting for a connection.  (If I
just kill the thread, I get a trap when the RTL cleans up.)

I am wondering if I can use DosSetNPHState to set ONE INSTANCE of a pipe to
nonblocking mode while I am doing DosConnectNPipe on that instance and then
set it back when I am ready to use it, or if DosSetNPHState affects all
instances of a pipe?  I can't have all instances that may be in different
parts of pipe handling being switched back and forth between blocking and
nonblocking mode.  I just want to change ONE instance.

If you have any other suggestions, please let me know.

Thanks for your help

Rob.

--- Maximus/2 3.01
* Origin: Frog Hollow Port Moody BC 604-469-0264/0284 (1:153/290)
SEEN-BY: 396/1 632/0 371 633/210 260 267 270 371 635/506 728 639/252 670/218
@PATH: 153/290 2 716 7715 140/1 270/101 396/1 633/260 635/506 728 633/267

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