473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Python sockets UDP broadcast multicast question??

Hi all,

I have a question about python and sockets , UDP datagram in
particular. I'm new to socket programming so please bare with me.

I am trying to write a simple application that broadcast files to
another computer on the same network/subnet but I do not want the
receiver computer to have to respond, I only want it to receive the
packet.

So this was simple enough, but my problem is this when I send a file
that is say larger then 100K the receiver is not able to keep up with
the packets as they arrive. I get say 60 or so then the rest are
ignored.

I have tried a couple of different approaches like threading and
queuing, but all ultimately have the same problem.

So my question is how can I receive a continuous stream of UDP packets
to some kind of buffer for processing with out losing packets?

Thank you for any help or guidance that you provide.

- InOrlando
Aug 28 '08 #1
1 2839
On Aug 28, 1:09*am, inorlando <inorla...@gmail.comwrote:
Hi all,

I have a question about python and sockets , UDP datagram in
particular. I'm new to socket programming so please bare with me.

I am trying to write a simple application that broadcast files to
another computer on the same network/subnet but I do not want the
receiver computer to have to respond, I only want it to receive the
packet.

So this was simple enough, but my problem is this when I send a file
that is say larger then 100K the receiver is not able to keep up with
the packets as they arrive. I get say 60 or so then the rest are
ignored.

I have tried a couple of different approaches like threading and
queuing, *but all ultimately have the same problem.

So my question is how can I receive a continuous stream of UDP packets
to some kind of buffer for processing with out losing packets?

Thank you for any help or guidance that you provide.

- InOrlando
I am rusty on those. AIR as I recall, if you use UDP, you need to
coordinate with the sender what packets you receive and what you don't
by use of 'ACK' packets that acknowledge a packet is received. The
sender resends any packets that it hasn't received an ACK for.

If you want guaranteed receipt, you have to use TCP, as Francesco
stated. Still, when transmitting, the 'send' command doesn't
guarantee its entire contents are sent. It returns the length that
was transmitted, and you must try again with the remaining contents
continuously.
Aug 29 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: beliavsky | last post by:
How do you keep Python code properly indented as you modify it? I use an Emacs-type editor that has a Python mode, so the initial indenting is easy. If I later want to put a 'for' loop (or an 'if'...
6
by: Laxmikant Rashinkar | last post by:
Is there any way to use a C# socket in promiscuous mode? Any sample code that shows how this is done? any assistance is much appreciated! thanks LK
0
by: Naveen Mukkelli | last post by:
Hi, I'm using multicast using C#. When receiver disconnects from the server and reconnects, following exception is occuring System.Net.Sockets.SocketException: Only one usage of each socket...
0
by: mark.howells | last post by:
Does anyone know how I can use multicast sockets in PHP? There doesn;t appear to be any support for controlling mcast related socket options... I have seen a note that illustrates how to send...
2
by: Gunnar_Frenzel | last post by:
Hello, this might be an easy question, but I don't have any handy solution at hand. I have an application that is supposed to send UDP broadcast. So far so easy, I did: Socket sockSendBroadcast...
1
by: jlamanna | last post by:
Hi. I'm adding IPV6 support to my app, and I have a UDP Broadcast socket that I need to redo using IPV6. I know that IPV6 doesn't have a notion of broadcast anymore, its all multicast (broadcast...
2
by: Mali Findik | last post by:
Hi @ll, i've got problems with sending an UDP broadcast datagramm over two network interfaces. The code is like this: <Code> UdpClient client = new UdpClient(); IPEndPoint remoteEndPoint =...
0
by: Stodge | last post by:
I'm trying to get a simple multicast application working using Twisted; so far I have: from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor from...
1
by: Jean-Paul Calderone | last post by:
On Thu, 9 Oct 2008 06:03:44 -0700 (PDT), Stodge <stodge@gmail.comwrote: Your server and client are both listening on the multicast address 224.0.0.1. Traffic sent to that address will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.