For clarity, what specific .NET class are you thinking of?

I'd imagine that any .NET socket object has more "state" than just an OS socket 
handle.    (There are many kinds of sockets; listening sockets [for servers], service 
sockets [a server-side socket created to service a client request], client sockets, 
UDP sockets, blah blah.  Even if you only think of client-side TCP sockets, the state 
of the socket is non-trivial, and having private data that represents the state -- 
rather than querying the API for each state value when needed -- makes sense.)

Perhaps you could suggest that a constructor overload that allows you to pass an 
existing socket handle and a value from a socket-state enumeration would be useful.  
It would make a .NET wrapper for that socket, querying the API for each of the private 
state values.

At 07:56 AM 8/27/2003 -0400, Akshay Arora wrote (in part)
>Though it would have been nice to be able to get a socket from the OS
>Handle. I still don't see why I can't do that.
>
>-akshay


J. Merrill / Analytical Software Corp

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to