Communicating a switch closure over Ethernet to control a remote relay

I am new to Ethernet communications and need some help. I want to monitor the status of a digital pin and communicate the status over the Ethernet to another Arduino to control a relay. I only need to send a single digit, which could either be text or binary.

Speed is important. I would like to have the remote relay respond in less than 50 ms. Once the IP connection is made it will stay connected until I manually close it, and there will only be one client.

I am looking for a recommendation on what protocol to use: TCP, UDP, or Telnet? Is the Wiz5100 better for this application or can I use an ENC28J60 with the UIPEthernet library?

Thanks for your help,


I would tend to use a TCP virtual circuit - once it is connected you can send data either way. is the ethernet local or over the internet?

The connection will be over the Internet, and my remote location uses for DNS.


the problem is your 50 ms response - the internet is not intended for real time control

I operate a ham radio station, using Internet remote control. I use a mix of commercial products, and a Visual Basic application that I access using TeamViewer. The response time is fine. The one problem that I have is a foot controlled push to talk switch that controls switching the radio from receive to transmit. I am currently using a software product that combines voice codecs with a push to talk switch. I don't need the voice codecs because Skype works fine for this. This software product has a bug or a memory leak that periodically locks up the push to talk.

I would like to have something that I can maintain for the push to talk.