Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Testing QuickServer from telnet and java.io (not nio) is ambiguous
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jarl André Hübenthal  
View profile  
 More options Sep 29 2012, 10:58 am
From: Jarl André Hübenthal <jarl.an...@gmail.com>
Date: Sat, 29 Sep 2012 07:58:41 -0700 (PDT)
Local: Sat, Sep 29 2012 10:58 am
Subject: Testing QuickServer from telnet and java.io (not nio) is ambiguous
I have checked the source, the line break separator is actually \r\n.
In 1.4.7. In older sources QS checks the system property for the OS
default. Not anymore. Only \r\n.

If I send from telnet "whatever\r\n\whateverelse\r\nsomeothertext"

This string is understood by QS as one command?? And I cannot parse a
multiline command in QS. It must be an unique line. Its how my QS
implementation should work.

How does telnet and QS work together? What does telnet adds in
windows? Why doesn't telnet successfully work with \r\n?

And why doesn't it work to send "whatever\r\n\whateverelse\r
\nsomeothertext\r\n" in a PrintWriter with its print method and NOT
the println?? In a java socket test (java.io)?
String s = "whatever"+System.getProperty("line.separator");
out.print(s);

Note: I do not want to use println method on printwriter. It should be
possible to not use println? To just append the \r\n myself?

I am on windows, so the default is \r\n. But I feel lost in the
testing as its impossible to send one string to the server and expect
it to wait for next line break before it understand it as a complete
line.

This sucks really bad. But I think its an integration problem.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jarl André Hübenthal  
View profile  
 More options Sep 29 2012, 11:56 am
From: Jarl André Hübenthal <jarl.an...@gmail.com>
Date: Sat, 29 Sep 2012 08:56:07 -0700 (PDT)
Local: Sat, Sep 29 2012 11:56 am
Subject: Testing QuickServer from telnet and java.io (not nio) is ambiguous

Just to clarify Yes i have escaped back slashes and yada yada. This is a more complex problem.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jarl  
View profile  
 More options Sep 29 2012, 12:49 pm
From: Jarl <jarl.an...@gmail.com>
Date: Sat, 29 Sep 2012 09:49:04 -0700 (PDT)
Local: Sat, Sep 29 2012 12:49 pm
Subject: Re: Testing QuickServer from telnet and java.io (not nio) is ambiguous

I am trying to work around the problem. Need to cache or append the
incoming command to a property on the client data object and deside if an
index exist for "\r\n" and then substring the cached command until this
index and then process this result. The cached command will be from this
index to the length of the string minus one. Thus making it possible to not
care about how the client passes the data or how the server is configured
to recieve. Making my application logic fully client and server agnostic.
By all means if you have comments please say them out loud :) but this is
my grand plan.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Akshath  
View profile  
 More options Sep 29 2012, 1:06 pm
From: Akshath <aksh...@gmail.com>
Date: Sat, 29 Sep 2012 10:06:27 -0700 (PDT)
Local: Sat, Sep 29 2012 1:06 pm
Subject: Re: Testing QuickServer from telnet and java.io (not nio) is ambiguous

If you have control of your client make sure you use some thing like
BufferedOutputStream which is platform agnostic and add \r\n in code.

But if you do not control your client and if the client can separate the
commands using \r or \n or \r\n then its best you setup DataMode.IN to
DataMode.BYTE and then use the logic as you described in your last post to
breakup commands and process them.
(refer -* *http://code.google.com/p/quickserver/wiki/DevelopersGuideCh9 for
more info on DataMode)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jarl  
View profile  
 More options Sep 29 2012, 4:26 pm
From: Jarl <jarl.an...@gmail.com>
Date: Sat, 29 Sep 2012 13:26:40 -0700 (PDT)
Local: Sat, Sep 29 2012 4:26 pm
Subject: Re: Testing QuickServer from telnet and java.io (not nio) is ambiguous

Aight. Thank you Akshath. Even I knew about Byte mode before its nice to
get kicked into using it. I configured the xml to use Byte for in, and made
an abstract caching client command handler that implements
ClientCommandHandler that makes sure to only call the actual protocol logic
if it stumbles upon \r\n. I found out that supporting \r and \n was
problematic because the clients only use \r\n and testing in telnet is
acceptable for now :)

Case closed :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »