Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. detecting the FTP connection break down.

detecting the FTP connection break down.

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadmin
5 Posts 2 Posters 0 Views 1 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.
  • V Offline
    V Offline
    vijay_aroli
    wrote on last edited by
    #1

    Hello everyone!! i am transfering a large amount of data to a FTP server. in the process, if the FTP connection goes down, how can i detect the connection loss???

    vijay.

    M 1 Reply Last reply
    0
    • V vijay_aroli

      Hello everyone!! i am transfering a large amount of data to a FTP server. in the process, if the FTP connection goes down, how can i detect the connection loss???

      vijay.

      M Offline
      M Offline
      Mila025
      wrote on last edited by
      #2

      Hi, Check socket handle - usually it's not valid any more. You didnt write what do you use.

      ----------- Mila

      V 1 Reply Last reply
      0
      • M Mila025

        Hi, Check socket handle - usually it's not valid any more. You didnt write what do you use.

        ----------- Mila

        V Offline
        V Offline
        vijay_aroli
        wrote on last edited by
        #3

        hello sir, sorry that i didnt write what i am actually doing. i am using CFtpConnection Class and using Putfile() function i am uploading the files to FTP server. but i want to know how to detect the connection loss (if any) while transfering the files. should i have to ping the server at certain time intervals or is there any other way of detecting the connection breakdown.???

        vijay.

        M 1 Reply Last reply
        0
        • V vijay_aroli

          hello sir, sorry that i didnt write what i am actually doing. i am using CFtpConnection Class and using Putfile() function i am uploading the files to FTP server. but i want to know how to detect the connection loss (if any) while transfering the files. should i have to ping the server at certain time intervals or is there any other way of detecting the connection breakdown.???

          vijay.

          M Offline
          M Offline
          Mila025
          wrote on last edited by
          #4

          Hi, No, pinging does tell you nothing because e.g. server can disconnect your session in any reason but its own will still working. Add callback function to your code and check events CInternetSession::OnStatusCallback.

          ----------- Mila

          V 1 Reply Last reply
          0
          • M Mila025

            Hi, No, pinging does tell you nothing because e.g. server can disconnect your session in any reason but its own will still working. Add callback function to your code and check events CInternetSession::OnStatusCallback.

            ----------- Mila

            V Offline
            V Offline
            vijay_aroli
            wrote on last edited by
            #5

            ok sir, thanks a lot.:)

            vijay.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups