Thank you very much!

But I have closed the socket every time after connecting server. So, when
client close socket, is it mean that it actively shutdown connection, and
does server know client's socket closing, and what's server's reaction, will
it release the resource of machine?

So, how do I implement server's active release related resource when client
close zmq's tcp socket. And the original BSD socket have two types of TCP
server socket, one is listen socket, the other is connection socket. TCP
server can close the connection socket for releasing resource. But how do
ZMQ do to achieve this function?
2011/7/21 Pieter Hintjens <[email protected]>

> On Thu, Jul 21, 2011 at 11:23 AM, yy l <[email protected]> wrote:
>
> > As you said, "test" code is almost commented out. But that is exactly
> what I
> > confused. My server doesn't send any data but only bind the socket.
> However,
> > it's memory still grows continunously.
>
> Your client keeps connecting, which is incorrect. 0MQ sockets will
> automatically reconnect when their peer comes online. So you create a
> socket ONE time, connect ONE time, and then wait for data to arrive.
>
> By creating sockets and connecting them over and over, you are doing a
> denial-of-service on the server, and it is normal that the process
> (server, and also client, probably) will run out of socket handles and
> fill up memory.
>
> -Pieter
>  _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to