[zeromq-dev] IPC on Windows (again)
Martin Lucina
mato at kotelna.sk
Sat Mar 19 10:34:07 CET 2011
sustrik at 250bpm.com said:
> On 03/18/2011 02:09 PM, Martin Lucina wrote:
>
> > What do you think? This approach would provide the name lookup without the
> > need for any external service.
>
> Why not simply write auto-generated port number to the file provided in
> the connection string? The other peer would then simply read the port
> number from the file. Actual communication would be performed over
> standard TCP socket on said port.
That approach is unfortunately insecure and full of race conditions.
You need an atomic call to create the endpoint OR fail, and you want the
endpoint to go away when the owning process goes away. Can't be done
reliably with files.
-mato
More information about the zeromq-dev
mailing list