C# Class NAPS2.Util.Pipes

Simple inter-process communication between NAPS2 instances via named pipes.
Mostra file Open project: cyanfish/naps2 Class Usage Examples

Public Methods

Method Description
KillServer ( ) : void

Kills the pipe server background thread if one is running.

SendMessage ( Process recipient, string msg ) : bool

Send a message to a NAPS2 instance running a pipe server.

StartServer ( Action msgCallback ) : void

Start a pipe server on a background thread, calling the callback each time a message is received. Only one pipe server can be running per process.

Private Methods

Method Description
GetPipeName ( Process process ) : string

Method Details

KillServer() public static method

Kills the pipe server background thread if one is running.
public static KillServer ( ) : void
return void

SendMessage() public static method

Send a message to a NAPS2 instance running a pipe server.
public static SendMessage ( Process recipient, string msg ) : bool
recipient System.Diagnostics.Process The process to send the message to.
msg string The message to send.
return bool

StartServer() public static method

Start a pipe server on a background thread, calling the callback each time a message is received. Only one pipe server can be running per process.
public static StartServer ( Action msgCallback ) : void
msgCallback Action The message callback.
return void