P
Peter Reinhold
Hi All,
I am developing a small utility, and have run into a small challenge.
The util is used for performing operations on a bunch of files, and it
can be triggered from the right-click menu when you click on a file.
My problem now is, if the util is already running, I want to stop a
new instance from spawning, and, at the same time, pass the parameters
from the soon-to-be-despawned instance, to the main instance.
My solution at this moment is to open a socket on LocalHost when the
first instance starts, and then on the following, check if something
is bound in the specific port, and then pass the parameters via TCP.
But, can this be done more elegantly?
The reason i'm asking is that this approach seems very "hacky" to me,
but, on the other hand, it works, and I haven't been able to make it
loose parameters or misbehave in other ways.
/Peter
I am developing a small utility, and have run into a small challenge.
The util is used for performing operations on a bunch of files, and it
can be triggered from the right-click menu when you click on a file.
My problem now is, if the util is already running, I want to stop a
new instance from spawning, and, at the same time, pass the parameters
from the soon-to-be-despawned instance, to the main instance.
My solution at this moment is to open a socket on LocalHost when the
first instance starts, and then on the following, check if something
is bound in the specific port, and then pass the parameters via TCP.
But, can this be done more elegantly?
The reason i'm asking is that this approach seems very "hacky" to me,
but, on the other hand, it works, and I haven't been able to make it
loose parameters or misbehave in other ways.
/Peter