I've just gone into code burnout/demotivation because I realized how stupid it is to reliably send numbers (or anything other than strings) over sockets...
Have you considered writing a light API over whatever you want to do, and then using that? That way you just have to write the endian-handling data mangling code once, and then you can call your API instead, and forget those issues even exist. Sockets are sufficiently annoying enough to use directly that a light wrapper is almost always a good idea.
Most socket code I've written works with "packets", which are whatever data blobs I want them to be, based on the problem I am trying to solve. I fill the packet up with data and call a send function, and on the other side I call a receive function to give me the next whole packet. My direct interaction with sockets then reduces down to setup, closure, and the send and receive calls. Works quite well.
Hope this helps push through the burnout. Let me know if you'd like some more suggestions.