socket.sendto / UDP problem

2010-10-20 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, When transmitting via UDP to a PLC, I run into a strange problem where socket.sendto returns double the number of characters sent in the datagram. I thought this was an error and used Wireshark to sniff the connection and discovered that it di

Re: socket.sendto / UDP problem

2010-10-21 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 00:07:58 +0100 MRAB wrote: > > > [snip] > > The docs for 'sendto' say: > > """The socket should not be connected to a remote socket, since > the destination socket is specified by address.""" > > Could your problem be caus

Re: socket.sendto / UDP problem

2010-10-21 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRAB wrote: > On 21/10/2010 15:57, Todd Walter wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 21 Oct 2010 00:07:58 +0100 > > MRAB wrote: > > &

Re: socket.sendto / UDP problem

2010-10-21 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRAB wrote: > On 21/10/2010 15:57, Todd Walter wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 21 Oct 2010 00:07:58 +0100 > > MRAB wrote: > > &

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 00:00:03 +0100 MRAB wrote: > On 21/10/2010 21:05, Todd Walter wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 21 Oct 2010 17:03:58 +0100 > > MRAB wrote: > >

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 00:00:03 +0100 MRAB wrote: > On 21/10/2010 21:05, Todd Walter wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 21 Oct 2010 17:03:58 +0100 > > MRAB wrote: > >

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 00:00:03 +0100 MRAB wrote: > On 21/10/2010 21:05, Todd Walter wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 21 Oct 2010 17:03:58 +0100 > > MRAB wrote: > >

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 22 Oct 2010 10:53:45 -0400 Tom Pacheco wrote: > On 10/21/2010 4:05 PM, Todd Walter wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Thu, 21 Oct 2010 17:03:58 +0100 > > MRAB wrote: &

Re: socket.sendto / UDP problem

2010-10-22 Thread Todd Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thank you all for your help, I now have a functioning interface. As it turns out, trying to do things the "correct" way was wrong. The timing was so tight that doing anything (such as traversing the while-loop once) instead of a read immediately afte