What is the meaning of strict read/write in this line of code:
protocol = [[TBinaryProtocol alloc] initWithTransport:transport
strictRead:YES
strictWrite:YES];
Here’s the full code:
Based on my reading of the PHP code, strict reading and writing sets the code to either use or require a version number in the first 32bit word of the message header.
The Binary Protocol in Thrift-0.8 defaults to always writing the version information, but not requiring it for reads.
I’d guess that if you are writing both the client and server, you’d want both strict reads and writes.