tags:

views:

202

answers:

4

Hello,

Lately I've been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has seen and/or used a helpful networking API for C#.

Thanks in advanced.

+4  A: 

Check out the System.Net and System.Net.Sockets namespaces in the .NET framework libraries. Eat your heart out.

Though I may have misunderstood your meaning of 'networking API'.

Wim Hollebrandse
+3  A: 

Networking is a very, very, very broad term. You might have more luck if you put some limits in your query, such as "I am looking for sample code for socket programming under c#". Still broad, but much more answerable.

C# has a lot of networking functionality built into the .NET framework., mostly in the System.Net namespace. I have found very few things that require using an external library or the windows networking api. You might check out the System.Net namespace and see if it has what you needs, otherwise maybe clarify what you are looking for.

Cub
+1 good answer, however, if you want to do anything with SSH you'll have to use a third party library.
Malfist
True, SSH is not supported out of the box from .net (nor is sftp), although mono does. Perhaps with Microsoft's involvement in Mono, they will eventually incorporate some of the features back into the main .net framework.http://www.routrek.co.jp/en/product/varaterm/granados.html is a ssh package for .net, it is free software and under the apache license.
Cub
+2  A: 

If you're looking for something outside of what's already built-in to the framework, I've heard good things about Lidgren.

David Brown
+5  A: 

I highly suggest you look into the Windows Communication Foundation. It comes with any version of .NET 3.0 or greater, so if you're using VS 2008, you've got all you need.

It abstracts a heck of a lot of the details for networking, providing you with a very simple programming API. Even protocol details are abstracted away, and there are a ton of protocols to chose from already built in.

Hands down the best way to communicate across a network.

Randolpho
A simple programming API, but a hell of a configuration model ;)
Richard Szalay
Very very true. But I'd rather do it that way than any other way. :)
Randolpho
I was kinda looking for something like Apache MINA
AJ Ravindiran
@AJ Ravindiran: WCF is very similar in concept to Apache MINA, if not exactly in construction and execution. The goals of both are abstraction, performance, and simplicity.
Randolpho