views:

52

answers:

1

Hi,

I am using C#.net and need to connect to a device that has ethernet (ip address). What class can I use to communicate with such a device

+2  A: 

Well not knowing what device what protocol or what you are doing I would go with.

System.Net.sockets.TcpClient or system.net.sockets.udpclient

rerun
Do you mean System.Net.Sockets.TcpClient and System.Net.Sockets.UdpClient ?
Macka
What information do I need to look for in order to figure out what Class I will need to use?
SA
@macka yes @SA you need to know a lot of things. First of all how your "device" expects you to communicate with it after that I would start with the documentation of these classes. Try some code and if you can't get that to work post another question.
rerun
@rerun - okay sounds good. But are these the 2 classes that are commonly used?
SA
@SA It all depends on the device and what you need to do with it. There are hundreds(thousands? more?) of protocols out there that sit on top of TCP and UDP. We need some more information
prestomation
I need to get a better understanding of TCP and UDP? Can you suggest any good sites/articles which talk about this from an implementation perspective?
SA