You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Pat Mao <pa...@gmail.com> on 2008/06/26 17:00:09 UTC

Cocoa Client

Bare with me as I'm completely new to Objective-C...  We have our Thrift
server written in Ruby, but we need to make a Cocoa client to it.  I was
looking for a tutorial for one but didn't see one.  I'm pretty sure I'm
creating the client connection correctly, but once I call one of it's
services I get a "TTransportException: Cannot read. Remote side has closed."

Here's what I have:

TSocketClient * transport = [[TSocketClient alloc]
initWithHostname:@"myHostname"
port:9090];
TBinaryProtocol * protocol = [[TBinaryProtocol alloc]
initWithTransport:transport];
MyClient * client = [[MyClient alloc] initWithProtocol:protocol];
NSArray * types = [client getObjectTypes];

I get the exception on the last line.  Any help is greatly appreciated.

Thanks,
Pat