Re: NNTP client problem (BSD Sockets)
- From: Niz <niz@xxxxxxxxxxx>
- Date: Mon, 17 Mar 2008 08:21:39 +0000
On 2008-03-17 05:53:20 +0000, David Schwartz <davids@xxxxxxxxxxxxx> said:
On Mar 16, 11:09 am, Niz <n...@xxxxxxxxxxx> wrote:
I know you may be thinking that you'll just do things the quick way
first and clean it up later, but it will save you a lot of trouble to
do it right from the beginning.
You throw away the return value. What if you only received one byte
and didn't get the whole message?
That is just for ease of reading on the newsgroup. The return value is checked in my actual code.
printf("%s", buffer);
The '%s' specifier is for C-style strings. You don't have a C-style
string, you just have an arbitrary collection of characters. So why
are you treating it as a string?
I was under the impression that a string was an arbitary collection of characters. Anyway it is irrelavant at the moment due to the fact that it never reaches this point anyway :).
The %s printf statement works fine for a malloced array of char, what is the best option to use?
If you 'telnet' to the NNTP server and send these two strings, do you
normally get a reply after the 'AUTHINFO PASS' line?
DS
Ah, doh never thought to use Telnet to check this.
.
- Follow-Ups:
- Re: NNTP client problem (BSD Sockets)
- From: David Schwartz
- Re: NNTP client problem (BSD Sockets)
- References:
- NNTP client problem (BSD Sockets)
- From: Niz
- Re: NNTP client problem (BSD Sockets)
- From: David Schwartz
- NNTP client problem (BSD Sockets)
- Prev by Date: Text database?
- Next by Date: Re: advices on sockets
- Previous by thread: Re: NNTP client problem (BSD Sockets)
- Next by thread: Re: NNTP client problem (BSD Sockets)
- Index(es):
Relevant Pages
|
|