Hello there,
I have some experience in linux c programming with sockets. The problem is, all my little apps I have wrote (even the ones using threads) were consuming a lot of processor time, as the listen/ response system was always implemented in a loop.
Now, I have to implement a tcp server on a BeagleBone black, that will send and receive data from the client connected to it. The platform doesnt have much resources. I was wondering, either it is possible to implement a c++ tcp server without that consumptive big while and for example use callbacks or poxis functions? I Dont have experience in that, I tried to look around on the internet, but all the examples I found were either in a while(1) or to complex for my application and fast understanding.
I was wondering either any user of the forum could give me some hints, code examples or maybe links to tutorial that utilises the use of sockets with threading and callbacks/ posix? I am used to more low level programming with microcontrollers, where event driven situations can be easilly handled by interrupts. In this application, I would also like not to poll for the incoming data.
I would really aprichiate all help in this matter!