Crate existing_instance

Crate existing_instance 

Source
Expand description

Library for checking if there is already an instance of your application running, and optionally sending an existing instance a message.

This library deliberately aims to be simple and lightweight, so it only supports a single existing instance.

Structs§

Listener
IPC listener to listen to incoming connections
Stream
IPC message stream with a simple protocol

Enums§

Endpoint
Communication endpoint between an exsiting and a new instance
Msg
Message between two processes

Functions§

establish_endpoint
Connect to an existing instance, or establish self as the existing instance
wait_to_be_new
Try to wait to be the new instance with a configurable timeout and sleep interval between attempts.