1

i'm going to build a instant messager and now i have to decide how i implement the networking. So far i only worked with Sockets (TCP or UDP). Now i heared about RMI (in Java) and want this in my C#-Chatapplication too.

There is .NET Remoting and WCF. I think building the instant messager with Sockets is not a good idea, right? But that should i use? .NET Remoting or WCF? .NET Remoting seems to be the older technologie and is similar to Java RMI. I read that .NET Remoting is faster than WCT (article from 2007).

Which technologie should i use for my instant messager? I want to send formatted text from the richtextbox and inline images. Furthermore i want to exchange files from chat-client to chat-client.

For .NET Remoting i found a tutorial which uses

ChannelServices.RegisterChannel(myChan);

But this is marked as obsolete. Is .NET Remoting a obsolete technologie? Is it possible to send images and files with WCF or .NET Remoting or are Sockets the better choice?

I read that WCF is a collection of networking technologies (Web Services, Remoting, ...) but if i search for WCF and remote method invocation i only get examples for Web Services...

BTW: Later, i want to implement a Web-Client for my instant messager with ASP.NET. Are there some limitations respective to Networking (WCF/Remoting)?

Thank you :)

user437899
  • 8,879
  • 13
  • 51
  • 71

2 Answers2

1

For your instant messager solution I would recommend WCF P2P here is an article to get you started Peer-to-Peer Programming with WCF and here it is an example of p2p on codeproject.

Stefan P.
  • 9,489
  • 6
  • 29
  • 43
1

.NET Remoting is maintained for backward compatibility only as of .NET 3.0. Thus, if you are going to be using .NET 3.0 or greater, use WCF.

For your immediate use, I would suggest the NetTcpBinding. You can then select a more appropriate binding using the following chart.

WCF Binding Selection Flow Chart.

Finally, to learn about WCF, refer to this SO question.

Community
  • 1
  • 1
Matt Davis
  • 45,297
  • 16
  • 93
  • 124