Can I use NSString classes SYNCHRONOUSLY?
Can I use NSString classes SYNCHRONOUSLY?
- Subject: Can I use NSString classes SYNCHRONOUSLY?
- From: email@hidden
- Date: Wed, 14 May 2008 08:22:07 -0700 (PDT)
Greetings:
I need to mimic the following synchronous Java routine:
StreamConnection xmlstream = null;
HttpConnection connection = null;
..
xmlstream = (StreamConnection)Connector.open(SOAP_SERVER_URL + ";deviceside=false",Connector.READ_WRITE,true);
..
// -------------------------------- Send Request -------------------------------
OutputStream out = connection.openOutputStream(); // HttpConnection class.
out.write(xmlreq.getBytes()); // Note: 'xmlreq' is type String.
out.flush();
out.close();
// -------------------------------- Get Response --------------------------------
// Get the connection status
status = connection.getResponseCode(); // HttpConnection class.
=================================================
I'm reading up on NSStream; where delegation is used for Asynchronous process.
However, I need Synchronous processing.
I also need to alter properties of the stream and process the one-time response.
Question: can I use the NSStream classes or must I use the lower-level CFNetworking classes?
Regards,
Ric.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden