If you found a solution that sends some arbitrary bytes and it works for them, the same solution will work for you too if you just replace their arbitrary bytes with yours, I'd guess
This thread has a nice code to look at
Sending large data off Photon using TCPClient