.NET Framework Bookmark and Share   
 index > Network Class Library (System.Net) > Sockets
 

Sockets

I would like to implement my own lightweight socket, is there any source files i can look at to get a general idea. i program in java though i recently started C# and have gotten the hang of it, i implemented my own sockets in java because i was familiar with JNI(Java Native Interface, public native void tet(); similar to public extern void Test()), and in java we had a compiler that compiled the java methods with the native modifier into a C header file which we could then use, is there something similar in C#?

edit:
Never mind, i got the hang of it :)
but i would still like a tutorial or something that would give me complete coverage of the extern modifier
UQUE
http://msdn.microsoft.com/en-us/magazine/cc164123.aspxand http://msdn.microsoft.com/en-us/magazine/cc163910.aspxare good articles covering the use of p/invokes.

As a side note, did you consider using the System.Net.Sockets.Socket class? If so, were there particular things that made it not "lightweight" enough for you?

-dave
Dave Murray [NCL]

You can use google to search for other answers

Custom Search

More Threads

• I/O Completion Ports and Socket Send Performance
• Questions about TcpClient / TcpListener and Socket classes
• web client : A blocking operation was interrupted by a call to WSACancelBlockingCall
• WebService call resulting in SocketException
• Wireless Network Programming
• Send a mail with picture.
• Problem with DNS resolving using TcpClient.Connect()
• Connecting to GPRS network
• like Mikrotik Bandwith tester application
• Network monitoring s/w