[zeromq-dev] C# socket_close Syntax

lawillas4ever at yahoo.com lawillas4ever at yahoo.com
Mon Nov 7 18:27:20 CET 2011


I really don't have an Idea of how to add the function myself as you said. My core is not even C#, I'm just using it because of some restrictions to PHP.
Sent from my BlackBerry® wireless handheld from Glo Mobile.

-----Original Message-----
From: gonzalo diethelm <gdiethelm at dcv.cl>
Sender: zeromq-dev-bounces at lists.zeromq.org
Date: Mon, 7 Nov 2011 17:18:30 
To: ZeroMQ development list<zeromq-dev at lists.zeromq.org>
Reply-To: ZeroMQ development list <zeromq-dev at lists.zeromq.org>
Cc: Mikko Koppanen<mikko.koppanen at gmail.com>
Subject: Re: [zeromq-dev] C# socket_close Syntax

> > as far as I understand majority of the language with GC leave the
> > closing to GC. Otherwise this would cause annoying issues where the
> > object for the socket is valid but the underlying socket is invalid.
> > There should be no need for explicit close as usually object going out
> > of scope closes the socket.
> 
> It would be more appropriate if the binding developers explain why they've
> added the function, however, my guess is that it's used to close the socket
> immediately, as opposed to leaving it to GC to clean it at some later time.
> 
> Think of, for exmaple, bound ports. If you close the socket you want the port
> to be available for new sockets immediately rather than lingering on.

This is exactly why. Sometimes you cannot wait until GC triggers and must close your sockets before that happens.

-- 
Gonzalo Diethelm
DCV Chile
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


More information about the zeromq-dev mailing list