Re: Setting Up Socket Streams
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