I want to develop a program which will communicate over the internet to another c# program.

What is the best method of doing this? Is it to use sockets, or to use something more TCP based? Any help or information would be great.

Something I also want to achieve is a secure connection, so the method must allow for encryption.

Recommended Answers

All 4 Replies

Is it to use sockets, or to use something more TCP based?

Something "TCP-based" does use sockets.

Take a look at System.Net.Sockets, you probably just want to use TcpClient and TcpListener, and maybe you'll get better advice regarding a secure connection, but that probably involves using something in System.Net.Security

The only real decision you have is wether its TCP or UDP

And that's an easy decision: you want TCP, unless you specifically don't.

Or you're expecting a *lot* of connections in which case you have no choice either but at a cost :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.