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#
  4. Internet connection

Internet connection

Scheduled Pinned Locked Moved C#
question
5 Posts 5 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.
  • F Offline
    F Offline
    Fred 34
    wrote on last edited by
    #1

    how can we detect from inside of our own program that internet connection is now active or not?

    L Richard Andrew x64R J P 4 Replies Last reply
    0
    • F Fred 34

      how can we detect from inside of our own program that internet connection is now active or not?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      TcpClient has a Connected property. Is that what you are looking for?

      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

      1 Reply Last reply
      0
      • F Fred 34

        how can we detect from inside of our own program that internet connection is now active or not?

        Richard Andrew x64R Offline
        Richard Andrew x64R Offline
        Richard Andrew x64
        wrote on last edited by
        #3

        You can call this native function: InternetCheckConnection[^]

        The difficult we do right away... ...the impossible takes slightly longer.

        1 Reply Last reply
        0
        • F Fred 34

          how can we detect from inside of our own program that internet connection is now active or not?

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #4

          Fred 34 wrote:

          how can we detect from inside of our own program that
          internet connection is now active or not?

          For business applications I doubt that is generally useful. Might never be useful. You don't care if the "internet" is available. What you care about is if a service is available.

          1 Reply Last reply
          0
          • F Fred 34

            how can we detect from inside of our own program that internet connection is now active or not?

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            Just try accessing whatever it is you need to access. Nothing else matters.

            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