udp broadcast example, please

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Torsten Rueger

    udp broadcast example, please

    Moi,

    sorry, but I've searched and searched to find exact information on how
    to do a simple udp broadcast client/server, but can find it:

    I want to have a thread pinging (very small message) and possibly the
    same thread receiving maybe with a 1 second timeout. And the same code
    should be able to run as multiple instances on the same machine.

    Could someone with experience please post the 10 lines to make this
    happen. Please no general comments or things that "should" work. I've
    tried for hours with various socket options and addresses, so I would
    very much appreciate working code.

    Thanks
    Torsten


  • Irmen de Jong

    #2
    Re: udp broadcast example, please

    Torsten Rueger wrote:[color=blue]
    > sorry, but I've searched and searched to find exact information on how
    > to do a simple udp broadcast client/server, but can find it:[/color]

    Have you searched on your hard drive?
    It's right there: Demo/sockets/udpecho.py
    in the python source tree.

    --Irmen

    Comment

    • Matthias Baas

      #3
      Re: udp broadcast example, please

      On Wed, 17 Dec 2003 13:22:25 +0200, Torsten Rueger
      <torsten.rueger @hiit.fi> wrote:[color=blue]
      >sorry, but I've searched and searched to find exact information on how
      >to do a simple udp broadcast client/server, but can find it:
      >
      >I want to have a thread pinging (very small message) and possibly the
      >same thread receiving maybe with a 1 second timeout. And the same code
      >should be able to run as multiple instances on the same machine.[/color]



      There's an example how to send and receive UDP packets.

      - Matthias -

      Comment

      Working...