Re: Help on a socket problem FIX

2011-02-28 Thread Ted Mittelstaedt
On 2/24/2011 9:29 AM, Uri Guttman wrote: "TM" == Ted Mittelstaedt writes: TM> On 2/24/2011 12:42 AM, Uri Guttman wrote: TM> Uri, I am perfectly aware of what constitutes modern programming TM> practice. And the fact of the matter is that your very wrong, because TM> if I was

Re: Help on a socket problem

2011-02-25 Thread shawn wilson
You want quick and dirty? Figure out how the nntp module works. Then figure out at what point your program is calling that function and with what parameters. Then replace that function with yours. Then figure out what the program is looking for for output and fix the output that the Net::NNTP modul

Re: Help on a socket problem

2011-02-24 Thread Ted Mittelstaedt
On 2/24/2011 2:00 AM, John W. Krahn wrote: Ted Mittelstaedt wrote: On 2/23/2011 11:32 PM, John W. Krahn wrote: Ted Mittelstaedt wrote: Think of this as a chance to educate. If you were teaching a math class in elementary school and a child asked how to add 2 + 2 would you tell them to get a c

Re: Help on a socket problem FIX

2011-02-24 Thread Ted Mittelstaedt
On 2/24/2011 2:05 AM, John W. Krahn wrote: Ted Mittelstaedt wrote: OK since nobody helped me (sniff, sniff) I had to figure it out myself. Here is the problem code in the fragment: $sockaddr = 'S n a4 x8'; replacing it with $sockaddr = 'x C n a4 x8'; fixed the problem. The template for the

Re: Help on a socket problem FIX

2011-02-24 Thread Uri Guttman
> "TM" == Ted Mittelstaedt writes: TM> On 2/24/2011 12:42 AM, Uri Guttman wrote: TM> Uri, I am perfectly aware of what constitutes modern programming TM> practice. And the fact of the matter is that your very wrong, because TM> if I was going to rewrite this code the correct way wou

Re: Help on a socket problem FIX

2011-02-24 Thread John W. Krahn
Ted Mittelstaedt wrote: OK since nobody helped me (sniff, sniff) I had to figure it out myself. Here is the problem code in the fragment: $sockaddr = 'S n a4 x8'; replacing it with $sockaddr = 'x C n a4 x8'; fixed the problem. The template for the pack command was wrong. Th first two bytes

Re: Help on a socket problem

2011-02-24 Thread John W. Krahn
Ted Mittelstaedt wrote: On 2/23/2011 11:32 PM, John W. Krahn wrote: Ted Mittelstaedt wrote: Think of this as a chance to educate. If you were teaching a math class in elementary school and a child asked how to add 2 + 2 would you tell them to get a calculator? The NNTP protocol is very simple

Re: Help on a socket problem FIX

2011-02-24 Thread Ted Mittelstaedt
On 2/24/2011 12:42 AM, Uri Guttman wrote: "TM" == Ted Mittelstaedt writes: TM> $sockaddr = 'x C n a4 x8'; TM> Th first two bytes are length (0) and family, both of which are TM> unsigned char, so 'x C' (or 'n') handles those. TM> use Socket; TM> $that = sockaddr_i

Re: Help on a socket problem

2011-02-24 Thread Ted Mittelstaedt
On 2/23/2011 11:32 PM, John W. Krahn wrote: Ted Mittelstaedt wrote: Think of this as a chance to educate. If you were teaching a math class in elementary school and a child asked how to add 2 + 2 would you tell them to get a calculator? The NNTP protocol is very simple and this only uses a few

Re: Help on a socket problem FIX

2011-02-24 Thread Uri Guttman
> "TM" == Ted Mittelstaedt writes: TM> $sockaddr = 'x C n a4 x8'; TM> Th first two bytes are length (0) and family, both of which are TM> unsigned char, so 'x C' (or 'n') handles those. TM> use Socket; TM> $that = sockaddr_in($port,inet_aton($newshost)); TM> ($newshost

Re: Help on a socket problem FIX

2011-02-24 Thread Ted Mittelstaedt
OK since nobody helped me (sniff, sniff) I had to figure it out myself. Here is the problem code in the fragment: $sockaddr = 'S n a4 x8'; replacing it with $sockaddr = 'x C n a4 x8'; fixed the problem. The template for the pack command was wrong. Th first two bytes are length (

Re: Help on a socket problem

2011-02-23 Thread John W. Krahn
Ted Mittelstaedt wrote: Think of this as a chance to educate. If you were teaching a math class in elementary school and a child asked how to add 2 + 2 would you tell them to get a calculator? The NNTP protocol is very simple and this only uses a few of it's commands. The code works on older Fr

Re: Help on a socket problem

2011-02-23 Thread Ted Mittelstaedt
On 2/23/2011 7:18 PM, Jim Gibson wrote: At 6:16 PM -0800 2/23/11, Ted Mittelstaedt wrote: Hi All, I'm running into a problem with a pretty old freeware perl script called "readnews" it is in an archive named "readnews-1.85.tar.gz" that is available here: http://web.archive.org/web/200806161837

Re: Help on a socket problem

2011-02-23 Thread Jim Gibson
At 6:16 PM -0800 2/23/11, Ted Mittelstaedt wrote: Hi All, I'm running into a problem with a pretty old freeware perl script called "readnews" it is in an archive named "readnews-1.85.tar.gz" that is available here: http://web.archive.org/web/20080616183736/http://www.scn.org/~bb615/scripts/read

Help on a socket problem

2011-02-23 Thread Ted Mittelstaedt
Hi All, I'm running into a problem with a pretty old freeware perl script called "readnews" it is in an archive named "readnews-1.85.tar.gz" that is available here: http://web.archive.org/web/20080616183736/http://www.scn.org/~bb615/scripts/readnews-1.85.tar.gz I used these plus inn to create a