Re: How can a namedpipe client get the event of server's close?
- From: "Volodymyr Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx>
- Date: Mon, 21 Jan 2008 10:21:16 +0100
Better is to notify clients about server termination using own protocol.
--
V
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Kerem Gümrükcü" <kareem114@xxxxxxxxxxx> wrote in message
news:OfH4T0AXIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
Hi Niu,
How can I detect the close event
I dont know if you want to programm in a distributed
fashion for teh future, but before your server gies doen
it should inform the client (with e.g. a message Like
PM_PIPE_CLOSING or something like that) that it
is about to close the connection. Or you can work
with functions like:
WaitNamedPipe
GetNamedPipeHandleState
ConnectNamedPipe
GetNamedPipeServerProcessId
to check whether the pipe still responds/exists or
is inavailable,...
You can nearly use any file or pipe function
to check whether the pipi is avaiable or not,
if it still exists, pending or watever. The GetLastError
Function will give you detailed information about
the operations result you made!
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
.
- Follow-Ups:
- Re: How can a namedpipe client get the event of server's close?
- From: Kerem Gümrükcü
- Re: How can a namedpipe client get the event of server's close?
- References:
- Re: How can a namedpipe client get the event of server's close?
- From: Kerem Gümrükcü
- Re: How can a namedpipe client get the event of server's close?
- Prev by Date: RE: hotplug notification when Windows is finished enumerating a device?
- Next by Date: Re: How can a namedpipe client get the event of server's close?
- Previous by thread: Re: How can a namedpipe client get the event of server's close?
- Next by thread: Re: How can a namedpipe client get the event of server's close?
- Index(es):