Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4542

Re: Ruby socket does not get reply

From 7stud -- <bbxx789_05ss@yahoo.com>
Newsgroups comp.lang.ruby
Subject Re: Ruby socket does not get reply
Date 2011-05-14 12:42 -0500
Organization Service de news de lacave.net
Message-ID <0eed02520a1b5c7e92ea3af9fe208943@ruby-forum.com> (permalink)
References <7b38b4a345bec72155b081e9245f6dc1@ruby-forum.com> <773171f75133a8aed0af80a33887ad43@ruby-forum.com> <40591443021fa4cb22bcd0feb32c6fe6@ruby-forum.com> <e14707455e856332a6b405e50cfead5b@ruby-forum.com> <ed295a788f4eb4306cf32f1a1001eedf@ruby-forum.com>

Show all headers | View raw


7stud -- wrote in post #998709:
> That may or may not make a difference to a particular program.
>

One way to avoid the newline conversion is to use the actualy ascii code 
for a newline instead of "\n":


"\r\n" in octal:

"\015\012"

"\r\n" in hex:

"x0D\x0A"

To avoid the ugliness of those escape sequences, perl has the constant 
CRLF, which can be used in strings, when correct reading of the data 
requires that line endings be marked by exactly one "\r" and one "\n". 
However, I don't think ruby copied that feature from perl.

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Ruby socket does not get reply Robert Garrido <rob_gar_esp@hotmail.com> - 2011-05-13 12:19 -0500
  Re: Ruby socket does not get reply 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-13 13:08 -0500
  Re: Ruby socket does not get reply Roger Pack <rogerpack2005@gmail.com> - 2011-05-13 13:53 -0500
    Re: Ruby socket does not get reply 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-13 14:03 -0500
      Re: Ruby socket does not get reply Robert Garrido <rob_gar_esp@hotmail.com> - 2011-05-14 02:41 -0500
        Re: Ruby socket does not get reply 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-14 12:16 -0500
          Re: Ruby socket does not get reply 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-14 12:42 -0500
          Re: Ruby socket does not get reply Gary Wright <gwtmp01@mac.com> - 2011-05-15 19:10 -0500

csiph-web