PipesServer.Stop

Closes every client connection and shuts the listener down.


Remarks

Closes each active client connection, which raises ClientDisconnected for each, then releases the listener.

Stop unblocks its own listening task by connecting a throwaway client, so it takes a moment rather than returning instantly.


Syntax

SyntaxDescription
Stop()Stop the server, sending disconnect events to each client, and shutting down the current active listener.

Example

1
2
3
4
5
6
7
8
9
using Nova.IPC.Pipes;

PipesServer server = new PipesServer("NovaDemoServer");
server.Start();

// Closes every client connection, then releases the listener. Stop
// connects a throwaway client of its own to unblock the listening
// thread, so it does not return instantly.
server.Stop();
This post is licensed under CC BY 4.0 by the author.

Trending Tags