C# Class NAPS2.Util.Pipes

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

Méthodes publiques

Méthode 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

Méthode Description
GetPipeName ( Process process ) : string

Method Details

KillServer() public static méthode

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

SendMessage() public static méthode

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.
Résultat bool

StartServer() public static méthode

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.
Résultat void