Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Issue! 10053 socket error while trying to send data from hercules
Forum Updated to NodeBB v4.3 + New Features

Issue! 10053 socket error while trying to send data from hercules

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 4 Posters 849 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ShruthiRich
    wrote on last edited by
    #2

    I have not used any closeSocket() in my application.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #3

      Hi and welcome to devnet,

      Are asking to help debug the server side code ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        ShruthiRich
        wrote on last edited by
        #4

        Thanks for your reply
        No. the code snipet which i have posted is client side.

        i dont have server code, so i am using "Hercules" tool to server me as Server.

        Can you look into my client code and suggest me if i am going wrong in flow of receiving the data

        1 Reply Last reply
        0
        • S Offline
          S Offline
          ShruthiRich
          wrote on last edited by
          #5

          I tried this code in while loop. even then simple data sent from "Hercules" is immediatly closing the connection. what is causing this close/abort in connection im not sure. im stuck still

          do {

                              bytes_rcvd = recv(sock_fd_g[0], recv_buff, 1, 0);
                              if ( bytes_rcvd > 0 )
                                  printf("Bytes received: %d\n", bytes_rcvd);
                              else if ( bytes_rcvd == 0 )
                                  printf("Connection closed\n");
                              else
                                  printf("recv failed: %d\n", WSAGetLastError());
          
              } while( bytes_rcvd > 0 );
          

          The error is : recv failed:10053

          1 Reply Last reply
          0
          • S Offline
            S Offline
            ShruthiRich
            wrote on last edited by
            #6

            Hello guys,

            The same code with simple syntax/compatibliy changes i worked on QT version 4.7.
            i worked absolutely fine.

            i was able to receive the data.
            can anybody please tell me why the same thing is not working for 5.13.2 QT version.
            do i need to apply anything more to my code to make it work

            1 Reply Last reply
            0
            • S Offline
              S Offline
              ShruthiRich
              wrote on last edited by
              #7

              I tryed to execute the same code with 5.10 version of QT the recv() call is working absolutely fine.
              the connection is getting closed only when i execute the GUI in 5.13.2 and try to receive some one byte/n bytes of data from "Hercules" tool.

              Kindly share your view on this or if anybody is currently working on 5.13.2 then le me know if i am missing anything to get the right support from current version.

              Thank you

              1 Reply Last reply
              0
              • Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Since you absolutely don't use any Qt socket stuff here I don't know how we could help. Don't see any relation to Qt here.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                S 1 Reply Last reply
                1
                • Christian EhrlicherC Christian Ehrlicher

                  Since you absolutely don't use any Qt socket stuff here I don't know how we could help. Don't see any relation to Qt here.

                  S Offline
                  S Offline
                  ShruthiRich
                  wrote on last edited by
                  #9

                  @Christian-Ehrlicher Thanks for your reply Chrisitian Ehrlicher. My major doubt is why does 5.13.2 below versions support my program. Y not the latest version. what is the difference thats causing the issue???

                  i am looking for an answer for the same, Because im going to use the latest version for my project. if these API issues occure in future this will lead to delay in delivery of product....!!!!!!!!!!!!!!!

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    ShruthiRich
                    wrote on last edited by
                    #10

                    Hello guys.
                    i am still stuck up, i have latest 5.14 version of qt but nothing workd for me @recv() case.
                    im not fully using TCPSOCKET of QT. More of C language is used as i had used in my previous project while developing in qt.

                    kindly look into it please.
                    the only cause i want to find is why is my socket getting closed at recv() data from "Hercules"

                    mrjjM 1 Reply Last reply
                    0
                    • S ShruthiRich

                      Hello guys.
                      i am still stuck up, i have latest 5.14 version of qt but nothing workd for me @recv() case.
                      im not fully using TCPSOCKET of QT. More of C language is used as i had used in my previous project while developing in qt.

                      kindly look into it please.
                      the only cause i want to find is why is my socket getting closed at recv() data from "Hercules"

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      @ShruthiRich
                      Hi
                      Since Qt being a c++ framework,
                      i cannot see how which version you use should affect your use of native windows api. ??

                      recv() has nothing to do with Qt and I cannot find anything to try regarding this and a certain Qt version.
                      It should simply have no effect.

                      Did you try fully use Qt for network instead ?

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved