• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can I use NSString classes SYNCHRONOUSLY?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Can I use NSString classes SYNCHRONOUSLY?
      • From: Dave Dribin <email@hidden>
  • Prev by Date: Re: Launching Cocoa Application externally
  • Next by Date: Re: Bypassing Interface Builder
  • Previous by thread: Re: Efficient XML loading [continuation of NSString from mapped NSData thread]
  • Next by thread: Re: Can I use NSString classes SYNCHRONOUSLY?
  • Index(es):
    • Date
    • Thread