Here is what I am trying to solve:
There is an external application that resides on another networked device that sends out data to an TCP IP:PORT. This is a random event and the end device does not participate as a Server or Listener it simply sends out data to TCP IP:PORT.
If this were a micro-controller I would create an interrupt that functioned when TCP IP:PORT had data. I have read through the most recent MonkeyBread (171) network-socket-method area and do not find what I need or at least do not understand how to implement
I have also attempted to use the Listener or Server examples and both fail since the other side is random.
I can get these to work as they are written by placing one on a desktop and one on another networked device provided the Server Side is started before the Listener side. However in this need the transmitting device never opens a socket until it needs to. That means a Listener will always ERROR out. Using a timer to rebuild the socket has a delay which increases the chances of losing data and once the data is sent there is no resend capability or the ability to request sending data. Basically the end device sending data is looking for a data logger device on the network identified by TCP IP:PORT
So how to implement Listening on a TCP IP:PORT that is not opened by the other end without creating an error on the ‘Listener’ side is what needs to be figured out.
Any thoughts on how to accomplish?
Thanks