Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Low level C/C++ networking concepts for real-time programming?

I'm rather interested in real-time programming and whilst I feel I know a decent amount regarding algorithms and data structures, I dont feel I know much about how to get the data into the computer as quick as possible in order to process.

Would any of you be so kind as to point me to topics I could google for, in order to help me? Most of my C books dont really touch on networking and my C++ books treat networking as a basic topic. For example, I wouldnt have much problem creating a UDP connection between two computers, but in what ways can you make the connection the most efficient?

Thanks in advance

like image 509
Paul Avatar asked Jan 19 '23 08:01

Paul


1 Answers

Just so you know: Real Time means that you have a time constraint on your application, it doesn't necessarily mean "fast" or "quick" or "efficient". Real-time operation can take 1 hour, but it will be real time as long as it is restricted to last no more than 1 hour.

As to the networking - it by itself is not real time as you cannot control the other side. There are various "real-time" protocols that handle this limitation in various ways (because you have time constraints on applications like clock syncing, video/audio streaming, etc), so you need to dig into these particular protocols - per need. One example is the RTP. You can see that it's fairly complicated, not just a UDP message written in an "efficient" way.

General network programming is system dependent, but you can start with UNIX networking and the BSD Sockets to get the idea.

like image 156
littleadv Avatar answered Jan 30 '23 04:01

littleadv