https://bugzilla.novell.com/show_bug.cgi?id=464139

User [email protected] added comment
https://bugzilla.novell.com/show_bug.cgi?id=464139#c3


Alan McGovern <[email protected]> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                
|[email protected]




--- Comment #3 from Alan McGovern <[email protected]>  2009-01-07 09:56:26 
MST ---
>From my testing here's some more info on socket behaviour:

for (int i = 0; i < 100000; i++) {
    Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
    s.Bind(new IPEndPoint(IPAddress.Loopback, 10000 + i));
}

This does not appear to create a native handle. If you try to bind multiple
sockets to the same port, an exception is thrown saying that you can't use the
same ip/port combo twice. I assume what's happening is that the port number is
being reserved, but not actually committed.

Socket.Connect definitely instantiates a native handle.
Socket.Accept definitely instantiates a native handle.
Socket.Listen definitely instantiates a native handle.

Socket.Listen (int backlog) appears to instantiate 'backlog' native handles.
For example:

Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
s.Bind(new IPEndPoint(IPAddress.Loopback, port));
s.Listen(100);

This allows me to instantiate 321 listeners on win XP before i hit the limit of
max open sockets. If i change to s.Listen(500) i get 160 listeners. If i use
s.Listen (50) i get 642 listeners.

Hope this helps.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to