How do I open thrift transport in Objective C?
I've created TBinaryProtocol and thrift client:
TSocketClient *socket = [[TSocketClient alloc] initWithHostname:serviceUrl
port:servicePort];
TFramedTransport *transport = [[TFramedTransport alloc]
initWithTransport:socket];
TBinaryProtocol *protocol = [[TBinaryProtocol alloc]
initWithTransport:transport strictRead:YES strictWrite:YES];
_client = [[BackendServiceClient alloc] initWithProtocol:protocol];
But every time I try to write (and flush) something to outProtocol,
TTransportException raised with reason: 'Error writing to transport output
stream'.
As far as I know, I should call open method on TTransport instance which
is either socket, but there is no such method in TTransport protocol.
So, SUBJ.
No comments:
Post a Comment