PipesServer.IsRunning
Reports whether the server is currently listening.
Remarks
Start hands listening to a background task, so the server is not necessarily running the moment Start returns. Poll this if the next step depends on the server being up.
The value becomes false once PipesServer.Stop has finished unwinding the listener.
Syntax
| Syntax | Description |
|---|---|
| IsRunning() | Indicates if the server has been started and is currently running. |
Returns
| Type | Description |
|---|---|
| bool | True if started and running, false otherwise. |
Example
1
2
3
4
5
6
7
8
9
10
11
using Nova.IPC.Pipes;
PipesServer server = new PipesServer("NovaDemoServer");
server.Start();
// Start hands listening to a background task, so the server is not
// necessarily running the instant Start returns.
while (!server.IsRunning())
{
System.Threading.Thread.Sleep(10);
}
This post is licensed under CC BY 4.0 by the author.