• 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
Re: Setting Up Socket Streams
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Up Socket Streams


  • Subject: Re: Setting Up Socket Streams
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 13 Jul 2008 14:15:43 -0700


On 13 Jul '08, at 1:46 PM, StaS Bandol wrote:

"Note that @"http://192.168.1.2"; is a URL, not a host name. Just use the host name portion of the URL." - so i shall use @"192.168.1.2" instead of @"http://192.168.1.2";?


Yes. Nearly any API that takes a domain name also accepts the numeric "dotted-quad" form.


then how can i asign a string("ping") to iStream .?


The input stream is where you receive data from. It's input for your process. You output data to the output stream. If you look at the API of NSOutputStream you'll see a -write:maxLength: method.

I really think you need to [re]read the documentation for the stream classes. You should also look at the CocoaEcho sample, which demonstrates how to do pretty much exactly what you want. You cannot just make stuff up and hope it works.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Re: Setting Up Socket Streams (From: StaS Bandol <email@hidden>)

  • Prev by Date: Re: SOAP server framework?
  • Next by Date: Re: Webkit and image redirects
  • Previous by thread: Re: Setting Up Socket Streams
  • Next by thread: NSURLConnection substitutes characters?
  • Index(es):
    • Date
    • Thread