No, I don't have link to any example codeIf you want an efficient protocol, it has to depend on what you are currently doing.
The most trivial (but probably not a very clever) approach would be to simply memcpy() your structure to the socket and then do the same on the other end.
I don't see how that's relevant to anything. Especially if you are sending to localhost which doesn't even use your network interface card.PS: Now I have receiving speed about 20 Mbit/s, at 1Gbit/s NIC. Test was performed on one machine.
Either you have efficiency or ease of use. Choose which is more important for you.
Bookmarks