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. problem with tcpclient when reconnecting.

problem with tcpclient when reconnecting.

Scheduled Pinned Locked Moved C#
sysadminhelp
5 Posts 3 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.
  • P Offline
    P Offline
    prasadbuddhika
    wrote on last edited by
    #1

    i use a tcpclient to connect to a server it works fine, but when i disconnect the tcpcleint and then again try to connect to server it gives th exception saying this endpoint is already in use. any idea to solve this. when disconnecting i call the tcpclient.close(). thanx in advance.

    P L 2 Replies Last reply
    0
    • P prasadbuddhika

      i use a tcpclient to connect to a server it works fine, but when i disconnect the tcpcleint and then again try to connect to server it gives th exception saying this endpoint is already in use. any idea to solve this. when disconnecting i call the tcpclient.close(). thanx in advance.

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

      I'm fairly sure you can't reuse it, but I don't recall ever trying.

      P 1 Reply Last reply
      0
      • P PIEBALDconsult

        I'm fairly sure you can't reuse it, but I don't recall ever trying.

        P Offline
        P Offline
        prasadbuddhika
        wrote on last edited by
        #3

        thanx for your reply, so is that mean once a tcpclient bound to an endpoint we cannot use that endpoint for another tcpclient even we close the first tcpclient ? thanx in advance

        P 1 Reply Last reply
        0
        • P prasadbuddhika

          thanx for your reply, so is that mean once a tcpclient bound to an endpoint we cannot use that endpoint for another tcpclient even we close the first tcpclient ? thanx in advance

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

          Again, I've never tried, I always make a new endpoint. See my TelnetSocket[^] article for how I use them.

          1 Reply Last reply
          0
          • P prasadbuddhika

            i use a tcpclient to connect to a server it works fine, but when i disconnect the tcpcleint and then again try to connect to server it gives th exception saying this endpoint is already in use. any idea to solve this. when disconnecting i call the tcpclient.close(). thanx in advance.

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

            I think there is a fairly lengthy delay (in the order of minutes) before the same endpoint can be re-used. A quick Google search should find the details for you.

            I must get a clever new signature for 2011.

            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