I am using asynchronous HttpWebRequest BeginGetResponse calls; the docs say that not closing
the stream in the callback may result in running out of connections.
How many connections can I have before “running out”? I am using .NET 3.5.
Also, is there a socket connection pool in the CLR. If so, where is this documented?
How many? Depends on a lot of things; sockets share the I/O thread pool with all the other asynch I/O mechanisms.
A short if unhelpful answer is “lots”. Unless you are creating a server of some sort you are highly unlikely to run out.
There isn’t a socket connection pool as such, but there is an asynch I/O thread pool as you may have gleaned from the above. You may find instructive this blog post from Eric Eilebrecht, whereas a following post is about what happens next.