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 pyt...@mrabarnett.plus.com 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 MRABpyt...@mrabarnett.plus.com 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 pyt...@mrabarnett.plus.com 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 MRABpyt...@mrabarnett.plus.com 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 pyt...@mrabarnett.plus.com 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 MRABpyt...@mrabarnett.plus.com wrote:

Re: socket.sendto / UDP problem

2010-10-22 Thread Antoine Pitrou
On Fri, 22 Oct 2010 09:27:51 -0400 Todd Walter twal...@rogers.com wrote: Is there a way to specify the source port for a transmission without first binding to it? Of course not, why do you want to do so? (well, not using plain UDP or TCP, that is. You can of course do that through ad-hoc means

Re: socket.sendto / UDP problem

2010-10-22 Thread Tom Pacheco
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 MRABpyt...@mrabarnett.plus.com 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

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 tomsli...@netp.org 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 MRABpyt...@mrabarnett.plus.com 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 after

Re: socket.sendto / UDP problem

2010-10-22 Thread Tom Pacheco
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 MRABpyt...@mrabarnett.plus.com 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

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 pyt...@mrabarnett.plus.com 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

Re: socket.sendto / UDP problem

2010-10-21 Thread MRAB
On 21/10/2010 15:57, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 00:07:58 +0100 MRABpyt...@mrabarnett.plus.com wrote: [snip] The docs for 'sendto' say: The socket should not be connected to a remote socket, since the destination socket is

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 pyt...@mrabarnett.plus.com 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 MRABpyt...@mrabarnett.plus.com 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 pyt...@mrabarnett.plus.com 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 MRABpyt...@mrabarnett.plus.com wrote:

Re: socket.sendto / UDP problem

2010-10-21 Thread MRAB
On 21/10/2010 21:05, Todd Walter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 21 Oct 2010 17:03:58 +0100 MRABpyt...@mrabarnett.plus.com 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

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

Re: socket.sendto / UDP problem

2010-10-20 Thread MRAB
On 20/10/2010 21:20, Todd Walter wrote: -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