tags:

views:

338

answers:

2

How to create simple C# Binary socket server (Not WCF!)

Who knows the Simplest Way To Open and Use a Socket in C# (Not with WCF)?


What do I need? I need -

  • Open Source Libs
  • Tutorials
  • Blog posts/Articles


Vote!) one who will take at least (0+25) votes wins

A: 

Probably use winsock.

here is what google found:

Winsock with c#

And there is a lot more out there...

Dani
Don't use an activex control! Theres built in classes.
Daniel A. White
Have a look ato System.Net.Sockets namespace
Geoff
He asked for the simplest way.
Dani
Um, its not any simpler with the built in classes?
Daniel A. White
Actually it (link to some forum post) looks like simple and good explanation. But ACTIVEX... Not Open Source... not Cross platform... and sum of code lines will probably lose to TcpClient and TcpListener ...
Blender
+5  A: 

Use the standard .NET TcpClient and TcpListener classes -- they are trivial to use and do what you want.

If you want to use open source only, the Mono implementation of these classes works perfectly.

axel_c