Hi!

 

My application uses a session oriented design.  I have a PULL socket in
a client app and a PUSH socket in a server app. Sometimes my client app
goes away, and I do not know a way to detect this in my server, so I
keep sending messages into the PUSH socket (using non-blocking flag). 

When client application starts, it asks for the queue address from the
server app (using a non-ZMQ mechanism). At that moment, I do something
to close the old session and initialize a new session, then tell the
client the address to connect to for pulling messages.

Unfortunately, my client app gets a few "old" messages before getting
new ones.

 

What is the best solution for this? Is there a way to "clear the cache"
on the socket? Or is there a way to detect a client is no longer
connected?

I would like to avoid close/bind because it's a multi-user machine
(windows) with concurrent processes that quite actively take and release
TCP ports. I could end up with the port occupied by competition and that
leads to a whole list of things I have to take care about.

 

Thanks in advance,

Dorin

 

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to