I have noticed that when I try to send a ridiculously large string (say, 200k characters) via a TSocket, I run into problems either at the sending or the receiving end:
Sometimes TSocket::Send(const char *) hangs.
Other times it is TSocket::Recv(TMessage &) that throws an exception.
I know that ROOT uses C-style strings for the transfer, so this ought to fail at some point. I was wondering if anyone knows what a reasonable/safe string size would be.
I did manage to reproduce the problem, and I think I know what causes it.
The problem shows up when I try sending very large strings (holding a few hundred thousand characters) and either the sender’s or the receiver’s TSocket operate in non-blocking mode.
So, since the receiver in my program cannot be indefinitely in “listening mode”, I had to do something like this: