The Cocoa library and generator was written by someone who was using the
HTTP transport (to connect to Evernote's Thrift-based service API), so
there's a chance that the TCP socket transport for Cocoa may not be
complete. I.e. I'm not sure whether anyone's used this before.
[email protected] wrote:
Hi,
I successfully compiled the Cocoa libs for the iPhone after deleting the server
stuff. I wanted to stick to the tutorial so I generated the tutorial classes
and created a new iPhone project for accessing the tutorial server.
For having a local tutorial server I just used the java server and ran it on
localhost. (The java client seems to work fine btw)
I am currently trying to use the following code to call the "ping" function:
TSocketClient * transport = [[TSocketClient alloc]
initWithHostname:@"localhost" port:9090];
TBinaryProtocol * protocol = [[TBinaryProtocol alloc]
initWithTransport:transport];
CalculatorClient * client = [[CalculatorClient alloc]
initWithProtocol:protocol];
[client ping];
Unfortunately, this simple example does not work. As soon as the client ping
function call is being executed, I get an exception in TNSStreamTransport :
Error writing to transport output stream.
Can someone tell me what I am doing wrong here?
Regards
Daniel