I am looking for the simplest (and fastest) example of programming TCP sockets for Windows, c or C ++, depending on what can speed up its execution by sending trivial data, for example 1 byte or several bytes, but in one package, This is for research goals. I googled and found some examples, however each of them looks a little different, some of them in C, some of them in C ++, some use ZeroMemory (from windows), some use memset, some of them assign data according to differently, so while I can find winsock examples in c / C ++ and as long as I am not an expert in socket programming - I'm not sure if the c / C ++ code is absolutely minimalistic to achieve this in the fastest way.
I know that UDP will be much faster, but it must be reliable at the same time, so I'm looking for TCP.
I think I could try each one of them and try to find them, but it was interesting if some expert socket / winsock would have a super-simple server / client in C / C ++ with some synchronization function (high resolution) in in the end, I say super simple because I’m trying to determine how fast (and the fastest way) a socket can transfer to my machines, of course, it can include disabling the Nagle algorithm, and this is what I would like to do in any case. I'm not sure what other tricks people use.
Thank.
ra170 source
share