• 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: Trying to use NSStream
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to use NSStream


  • Subject: Re: Trying to use NSStream
  • From: Ryan Homer <email@hidden>
  • Date: Mon, 14 Jan 2008 08:28:08 -0500

Do you need to send \r? If so, send it before \n, i.e. send \r\n, not \n\r


On 12-Jan-08, at 8:16 PM, Development wrote:

Ok... Did any one else get the memo that the EOL character had been changed to the char(10).
Every document I've read and all information I have seen tells me that I suffix every line I send to a server with either \n or \r or \n\r or some other such combination. Either way... I have never had to do sendString = [NSString stringWithFormat:@"%@\r%c",aString,10]; I do not know what Char 10 is however I am assuming it is an EOL or EOF character? Either way this seems to be unique to NSStream as other tools I've used require only the \r. When using NSStream it seems that for anything but http it requires both a \r and character 10. (\n didn't work and neither did the character by itself.)
I discovered that with every server, the final character of each welcome message was ascii character 10 preceded by character 13 so I tried it and it worked.


I suppose I'm hoping some one can explain this to me. Even though it is working I do not understand why and would be grateful if some one could clarify.
_______________________________________________

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: 
 >Trying to use NSStream (From: Development <email@hidden>)
 >Re: Trying to use NSStream (From: Development <email@hidden>)

  • Prev by Date: Where to find artwork for 10.5-only system icons?
  • Next by Date: A question about NSPredicateEditor and NSPredicateEditorRowTemplate
  • Previous by thread: Re: Trying to use NSStream -another question
  • Next by thread: Re: Trying to use NSStream
  • Index(es):
    • Date
    • Thread