Python newbie looking into communications...

Peter Hansen peter at engcorp.com
Sat Jan 25 22:24:16 EST 2003


Sam Marrocco wrote:
> 
> I'd like the little Python apps that run on several machines to be able
> to communicate back and forth with the main vb.net app using (possibly)
> udp communications. I don't want the extra headaches involved in
> maintaining open connections (TCP)...something along the lines of:
> 
> SendData(MachineName,Data)

What headaches do you feel are involved in "maintaining" TCP connections?

So far as I know, there is *nothing* that must be done by application-
level code to "maintain" an open connection, except perhaps send and
receive data using it...

More to the point, do you realize what UDP doesn't provide you with?
The biggest thing it doesn't provide you with is any kind of 
guarantee that your data will ever be delivered.  The second biggest
thing is no guarantee that two packets will be delivered in the
order in which they were sent.

There's a reason much more code uses TCP than UDP.  If you need
reliable transmission of data, using UDP is *not* what you want.

-Peter




More information about the Python-list mailing list