Interrupting passive socket recv

Bjorn Gustavsson <>
Tue Nov 14 13:35:18 CET 2000


Luke Gorrie <> writes:

> Sean Hinde <> writes:
> 
> > Trying to be as precise as possible about an idea, here goes:
> > 
> > I'm thinking about an application in which my Erlang node might get flooded
> > with replies to a query it has sent over a socket.
> > 
> > This situation would appear to lend itself to a passive gen_tcp:recv/2 call
> > rather than an active socket so that the message buffer doesn't chew up all
> > the memory of my machine while it tries to deal with the flood.
> 
> I think the {active, once} feature would be good for this, but at a
> glance it appears to be undocumented (?) but present in R7B (and older
> versions I think).

We will document this feature in R8 (and perhaps some other hidden features
as well).

/Björn

-- 
Björn Gustavsson            Ericsson Utvecklings AB
      ÄT2/UAB/F/P
			    BOX 1505
+46 8 727 56 87 	    125 25 Älvsjö



More information about the erlang-questions mailing list