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 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 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 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 (