Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. network socket

    Log in to post
    • All categories
    • H

      Unsolved How to create HTTP request using form-data in QT
      General and Desktop • api network socket http-post networkauth form • • HemantSuryawanshi

      10
      0
      Votes
      10
      Posts
      2899
      Views

      H

      @Bonnie it worked. Thanks for your response

    • B

      Solved why QByteArray returned from QTcpSocket::readAll() is initialized only with NULL bytes
      General and Desktop • network socket readall • • bduminyuk

      6
      0
      Votes
      6
      Posts
      1689
      Views

      kshegunov

      You're going about it the wrong way. The readBufferSize property controls the internal (read) buffer of the QTcpSocket. You don't need to touch it at all. Just read whatever is you want to read directly from the socket. If you want to make your life easier you can also make use of QDataStream and its transactions (assuming you're talking to a Qt application on the other side).

      PS.

      control socket states like: free (buffer size is NULL), busy (buffer size is not NULL) and readyForReading (buffer is full, it emits signal itself)

      This makes no sense at all. Qt will asynchronously populate the socket object's buffer, so it's never "busy" or "free".

    • S

      Unsolved QTCPSocket with Qt 5.11.1 and Qt 5.6.1
      General and Desktop • qtcpsocket network socket socket connect problem connect failure • • silau

      4
      0
      Votes
      4
      Posts
      1197
      Views

      A

      @silau It looks good but ldd doesn't always report exactly what is actually happening when you run your exe. It's a good start though. If you really wanted to trace it further you would have to ldd on each of those libs to see what they link. One of them could be using the 5.6 or whatever other version you may have. That being said I find that to be a bit unlikely though.

      When I get a little bit of time later today I will run your code using Arch linux and 5.11 and see what happens. That will help determine if maybe it's a bug in Qt (which I highly doubt for something that big).

      If it works for me the next steps for you would be to run it in the debugger and step through the working 5.6 one during socket connections and then the broken 5.11 one and see what is different.

      Another option is take it down to the simplest form and just use the chat example or something from Qt and see if it works with 5.11 and then try to see what is different.

      I'll let you know what I find out on my linux/Qt 5.11 in a bit.

      Edit: Didn't get a chance today, was really busy. I will run a quick test tomorrow some time though.

    • CybeX

      Unsolved QAbstractSocket::UnknownSocketError provides errorString of "UnknownError"
      General and Desktop • qabstractsocket socket socketerror network socket network • • CybeX

      4
      0
      Votes
      4
      Posts
      4452
      Views

      kshegunov

      Don't get this the wrong way, but are you coming from Java? I'm asking because this:

      QHostAddress().AnyIPv4

      Doesn't make any sense in C++. What you probably want is to use the scope operator - :: to access one of the enum values. As for the error, please provide the full implementation of your TCP server and mention if you use threading, if so how. Also as mentioned by @koahnig

      new QTcpSocket(new QObject());

      This leaks 2 objects one socket and one generic QObject. You need to provide a valid pointer from the object tree to make use of the automatic deletion Qt supplies for child objects.

    • AmrCoder

      Unsolved QT voice chat Application on windows and android
      General and Desktop • mobile app deve network socket qt 5.6.1 tcp • • AmrCoder

      2
      0
      Votes
      2
      Posts
      2905
      Views

      C

      Hello i wish if i could help you. please i need to send voice over network using tcp socket and i believe you can help me if you give me your code (server and client side both )i will be very thankful.thank you soo much in advance.

    • Hamed.Masafi

      Unsolved Remote object sharing (OO RPC)
      General and Desktop • rpc server - client serialization network network socket • • Hamed.Masafi

      3
      1
      Votes
      3
      Posts
      2373
      Views

      Hamed.Masafi

      @SGaist Hi, However is in my plan.

    • V

      [Workaround]Strange udp socket when interchanging messages between Linux and Windows Box
      General and Desktop • network socket udp windows linux • • vman

      11
      0
      Votes
      11
      Posts
      3703
      Views

      V

      OK, I use two sockets now.
      On App A I have one socket for sending the broadcast message, and a second one on another port for receiving the answer.
      Same on App B. One socket for receiving the broadcast message and a second one for sending the answer on a different port.

      Still would be very happy if someone can find a solution for this using only one udp socket.

    • I

      QtWebsocket cannot connect to Netty's Websocket Server
      General and Desktop • network socket • • illunara

      1
      0
      Votes
      1
      Posts
      411
      Views

      No one has replied

    • E

      Problem with creating ssl server using QSslSocket
      General and Desktop • qsslsocket network socket network server qtcpserver qtcpsocket • • Eehsanmgh

      11
      0
      Votes
      11
      Posts
      4203
      Views

      E

      @t3685 Yes I'm sure.

    • X

      Qt 5.4 QTcpServer listening on IPv6 only
      General and Desktop • network socket • • xxxx

      2
      0
      Votes
      2
      Posts
      1316
      Views

      K

      Hi and welcome to devnet

      Sounds really strange and doesn ot make sense.
      Do you have a special linux build?
      And from where did you Qt install?