In a time of REST protocols... I still love the Binary Communication. I don't have much ideas this period, I need to find a different job (C# doesn't fit my code necessity). The Example Source code, contains two Folder. One is the Qt4 TcpServer the second one is the ugly application that you can see below :)
Note: This example doesn't have anything related to the Qt 4.5 Cocoa Support.
Run the Qt4 Server, and the Cocoa Application (Remember to change the SERVER_HOST in AppController.m) and try to send some binary data. The Qt Server will receive this data it will resend you. Protocol is Very easy 1 byte of Data Type (Int8, Int16, ..) and Data. Remember that Intel arch is Little Endian.
Note: This is just a "Draft" a "non complete" example only to give the idea on how it works.
The Source Code is available here: Qt/Cocoa DataStream Source Code.