🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
10 messages
10 total messages Started by Brian Moret Thu, 26 Mar 1998 00:00
NNTP commands fail to get response from server
#39782
Author: Brian Moret
Date: Thu, 26 Mar 1998 00:00
20 lines
1301 bytes
I'm writing a newsreader which will get the messages from a given
newsgroup and put those messages into a file with a particular format.

I'm developing under Windows NT 4.0, using java and my application
successfully connects to my news server.  I get the proper response of
"200 ...news server ready - posting ok".  But then I try to send the
command "GROUP news.software.readers" and I get no response from the
server.  I also tried to send the command, "HELP", but again, no
response.

Does anyone have any suggestions on what the problem might be?

I'd appreciate any suggestions or help,
Brian
bmoret@towerhill.com



Re: NNTP commands fail to get response from server
#39795
Author: Fluffy
Date: Fri, 27 Mar 1998 00:00
14 lines
1267 bytes
Brian Moret <bmoret@towerhill.com> wrote:
: I'm developing under Windows NT 4.0, using java and my application
: successfully connects to my news server.  I get the proper response of
: "200 ...news server ready - posting ok".  But then I try to send the
: command "GROUP news.software.readers" and I get no response from the
: server.  I also tried to send the command, "HELP", but again, no
: response.

You're terminating your commands with a CRLF and not just one or the
other, right?  It pretty common for people to forget about the
linefeed.

Re: NNTP commands fail to get response from server
#39798
Author: Curt Welch
Date: Fri, 27 Mar 1998 00:00
20 lines
1516 bytes
Brian Moret <bmoret@towerhill.com> wrote:
> Yes, for my purposes at the moment, I've hardcoded the string I send,
> it's:
>
>     strCmd = "GROUP news.software.readers\r\n";    //strCmd is of type

If you send that to the server, you WILL get a response.

You need to figure out why the code isn't doing what you
expect.  A network sniffer would be useful.  That will
tell you if the problem is your software not sending or
the server not responding.  It will also let you see exactly
what is going on.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Re: NNTP commands fail to get response from server
#39799
Author: Brian Moret
Date: Fri, 27 Mar 1998 00:00
41 lines
1785 bytes
Yes, for my purposes at the moment, I've hardcoded the string I send,
it's:

    strCmd = "GROUP news.software.readers\r\n";    //strCmd is of type
String

few lines later I do the following:
    dataOut.writeChars (strCmd);        //dataOut is of type
DataOutputStream
    dataOut.flush ();

    strResponse = dataIn.readLine ();    //dataIn is of type
BufferedReader

the response is a 503 - a timeout

Brian


Fluffy wrote:

> Brian Moret <bmoret@towerhill.com> wrote:
> : I'm developing under Windows NT 4.0, using java and my application
> : successfully connects to my news server.  I get the proper response
> of
> : "200 ...news server ready - posting ok".  But then I try to send the
>
> : command "GROUP news.software.readers" and I get no response from the
>
> : server.  I also tried to send the command, "HELP", but again, no
> : response.
>
> You're terminating your commands with a CRLF and not just one or the
> other, right?  It pretty common for people to forget about the
> linefeed.




Re: NNTP commands fail to get response from server
#39815
Author: Brian Moret
Date: Sat, 28 Mar 1998 00:00
51 lines
2383 bytes
I'd like to thank all who responded, I have found the problem.

This is my first foray into Java and obviously was wrong with my code.
I could prove I was sending chars out, but couldn't prove it was the
proper format.  So, at first I explored different socket types.  Then,
I'd been using the DataOutputStream.writeChars method, but upon further
examination, I used the DataOutputStream.writeBytes method.  That solved
my problem and I can continue with my development.  So, once again -
programmer error.

Brian

Pete the Plumber wrote:

> On Thu, 26 Mar 1998 15:24:23 -0800, Brian Moret <bmoret@towerhill.com>
>
> wrote:
>
> >I'm writing a newsreader which will get the messages from a given
> >newsgroup and put those messages into a file with a particular
> format.
> >
> >I'm developing under Windows NT 4.0, using java and my application
> >successfully connects to my news server.  I get the proper response
> of
> >"200 ...news server ready - posting ok".  But then I try to send the
> >command "GROUP news.software.readers" and I get no response from the
> >server.  I also tried to send the command, "HELP", but again, no
> >response.
> >
> >Does anyone have any suggestions on what the problem might be?
> >
> >I'd appreciate any suggestions or help,
> >Brian
> >bmoret@towerhill.com
> >
>
> Brian,
>
> I'm not sure what the problem is, but one way to troubleshoot these
> things is to connect to the server using a telnet client (with local
> echo on) and type in the command.  If you get the proper response,
> something is amiss with your code.
>
> Pete the Plumber




Re: NNTP commands fail to get response from server
#39697
Author: Bjoern Frantzen
Date: Mon, 30 Mar 1998 00:00
16 lines
1119 bytes
Russell Schulz <Russell_Schulz@locutus.ofB.ORG> wrote:
>fluffy@meow.org (Fluffy) writes:
>
>> You're terminating your commands with a CRLF and not just one or the
>> other, right?  It pretty common for people to forget about the
>> linefeed.
>or to use \r\n (instead of the \015\012 the RFCs require).

And you can explain the difference between '\r' and '\015' (or '0x0D' for
the matter)?

-- 
        Bjoern Frantzen      - bjoff@bgnett.no

Re: NNTP commands fail to get response from server
#39699
Author: Russell Schulz
Date: Mon, 30 Mar 1998 00:00
12 lines
1137 bytes
fluffy@meow.org (Fluffy) writes:

> You're terminating your commands with a CRLF and not just one or the
> other, right?  It pretty common for people to forget about the
> linefeed.

or to use \r\n (instead of the \015\012 the RFCs require).
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c

Re: NNTP commands fail to get response from server
#39714
Author: Fluffy
Date: Tue, 31 Mar 1998 00:00
17 lines
1384 bytes
Bjoern Frantzen <bjoff@bgnett.no> wrote:
: Russell Schulz <Russell_Schulz@locutus.ofB.ORG> wrote:
: >or to use \r\n (instead of the \015\012 the RFCs require).
: 
: And you can explain the difference between '\r' and '\015' (or '0x0D' for
: the matter)?

Some compilers try to "help" by redefining their default values to what
the native OS uses.  \r and \n are swapped on some Mac C compilers,
while some on Microsoft platforms change \n to a CRLF pair.

This kind of goofiness supposedly shouldn't happen in Java, but it
doesn't hurt to define the values yourself and be sure weird
redefinitions don't get in the way.

\r\n vs. \015\012 (was Re: NNTP commands fail to get response from server)
#39725
Author: Russell Schulz
Date: Wed, 01 Apr 1998 00:00
14 lines
1307 bytes
bjoff@bgnett.no (Bjoern Frantzen) writes:

>> or to use \r\n (instead of the \015\012 the RFCs require).
>
> And you can explain the difference between '\r' and '\015' (or
> '0x0D' for the matter)?

\n is the local end-of-line character.  this changes.  \015 and \x0D
are 13, the CR required by the RFC.  in ASCII, this does not change.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c

Re: NNTP commands fail to get response from server
#39733
Author: Bjoern Frantzen
Date: Wed, 01 Apr 1998 00:00
18 lines
1354 bytes
Fluffy <fluffy@meow.org> wrote:
>Bjoern Frantzen <bjoff@bgnett.no> wrote:
>: And you can explain the difference between '\r' and '\015' (or '0x0D' for
>: the matter)?
>Some compilers try to "help" by redefining their default values to what
>the native OS uses.  \r and \n are swapped on some Mac C compilers,
>while some on Microsoft platforms change \n to a CRLF pair.

I see now, I was too much thinking of the \r, that I didn't consider the
obvious CRLF that dos (and derivates) uses when you issue a \n.

I will try to think before posting next time.. ;-)

-- 
        Bjoern Frantzen      - bjoff@bgnett.no

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads