How is System.Net implemented?
-
15-06-2021 - |
Domanda
I'm learning networking in C#, and I realized that I'm completely dependent on the System.Net framework for networking (not that this is a bad thing). I don't understand how, using standard language features, without relying on any framework, you can connect to a network via C#.
Soluzione
Like a lot of managed runtimes the underlying code relies on native functionality. I could list the Win32 APIs that are used or you could just look at the source :) I prefer the latter.
.NET source has been open for about 4 years now.
Altri suggerimenti
The System.NET framework simply provides a managed wrapper around the windows API. If you want to see how MS does it, you can open the Assembly with a decompiler (Reflector or ILSpy) and look at the code.