Results 1 to 6 of 6

Thread: QUdpsocket send and receive broadcast in linux

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    77
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    10
    Thanked 1 Time in 1 Post

    Default Re: QUdpsocket send and receive broadcast in linux

    Quote Originally Posted by ChrisW67 View Post
    Why do you think you should bind(line 34) to a broadcast address (line 31) on the Linux machine?
    I read this in different forums for example here and see in other opensource too, however binding to IP address dont resolve problem anyway.

    I listen to a port bigger than 5000

  2. #2
    Join Date
    Mar 2010
    Posts
    77
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    10
    Thanked 1 Time in 1 Post

    Default Re: QUdpsocket send and receive broadcast in linux

    I test this code in ubuntu with Qt 5 library and it works.

    so i think maybe problem is network settings of my centos, actually my centos run in a virtual machine, anybody have a suggestion of changing settings of network for broadcast messages localy?

    thanks in advance

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: QUdpsocket send and receive broadcast in linux

    If you are using a virtual machine and you want it to talk to the outside world and accept connections/UDP from the outside world then you need to choose an appropriate virtual network interface option: usually "Bridged" or something like it. On the other hand, two virtual machines connected only to a shared VM-only network should require nothing special to talk to each other. Also need to check there is no default network firewalling going on in the OS.

Similar Threads

  1. QUdpSocket & broadcast & Windows7
    By xoz in forum General Programming
    Replies: 1
    Last Post: 27th October 2011, 10:08
  2. Using QUdpSocket to detect peripheral via a broadcast
    By Eos Pengwern in forum Qt Programming
    Replies: 4
    Last Post: 9th November 2010, 11:21
  3. QUdpSocket broadcast to multiple processes
    By tomschuring in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2010, 01:33
  4. Qt/S60 QUdpSocket broadcast problem
    By harnen in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 13th April 2010, 22:13
  5. how to send broadcast messages in networkadapters
    By jeo in forum Qt Programming
    Replies: 3
    Last Post: 26th March 2009, 10:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.