Results 1 to 2 of 2

Thread: udp send and receive on same port (the data i sent out is received on my port as well

  1. #1
    Join Date
    Mar 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default udp send and receive on same port (the data i sent out is received on my port as well

    hi,
    im learning to use the udp socket in QT4

    what happened was when i tried to send and receive on the same port using the same QUDPsocket
    whatever i send out i receive on my port and my client on the other end doesnt receive anything.
    however when i disable the binding and signal readyRead() it works fine

    my code is

    udpsock = new QUdpSocket(this)
    udpsock->bind(20000,QUdpSocket::ReuseAddressHint)
    connect(udpsock,SIGNAL(readyRead()), this, SLOT(processPendingDatagrams())

    is there something i did wrong here?

    thanks for yr help

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: udp send and receive on same port (the data i sent out is received on my port as

    How are you sending datagrams?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 5
    Last Post: 27th May 2011, 09:38
  2. Reading data from usb port
    By jantje78 in forum Newbie
    Replies: 6
    Last Post: 26th May 2011, 17:21
  3. DataPlot with data from Serial Port
    By przemek in forum Qwt
    Replies: 4
    Last Post: 2nd April 2011, 17:11
  4. send binary file over serial port with QSerialDevice
    By ilpaso in forum Qt Programming
    Replies: 30
    Last Post: 13th December 2010, 12:08
  5. data from serial port
    By bhe in forum Newbie
    Replies: 4
    Last Post: 3rd May 2009, 10:19

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.