This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Generic TCP Server for external requests
#2
Our example can be tuned for more messages per second if needed, but it will increase CPU load slightly.
It's true that UDP packets can be lost over a network. In our example UDP communication happens locally over a virtual loopback interface, so it should be fine.

You example has a race conditions between storage.get and storage.set calls which can lead to some messages being lost.

Anyway, if you really need to process a large amount of data you should use some ready-made solutions like MQTT.
Reply


Messages In This Thread
RE: Generic TCP Server for external requests - by admin - 14.07.2015, 08:26

Forum Jump: