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. socket disconnection

socket disconnection

Scheduled Pinned Locked Moved C#
sysadminhelp
4 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.
  • V Offline
    V Offline
    Vivek Vijayan
    wrote on last edited by
    #1

    In my applcn client first connects to server then client disconnects but the server should wait again to accept new connection. wht is the code to do this. can anyone help me .............

    This code was posted by me...

    C 1 Reply Last reply
    0
    • V Vivek Vijayan

      In my applcn client first connects to server then client disconnects but the server should wait again to accept new connection. wht is the code to do this. can anyone help me .............

      This code was posted by me...

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Well, your code was listening, so I guess it needs to listen for a connection again

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      V 1 Reply Last reply
      0
      • C Christian Graus

        Well, your code was listening, so I guess it needs to listen for a connection again

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        V Offline
        V Offline
        Vivek Vijayan
        wrote on last edited by
        #3

        how do i make server listen for new connection again

        This code was posted by me...

        K 1 Reply Last reply
        0
        • V Vivek Vijayan

          how do i make server listen for new connection again

          This code was posted by me...

          K Offline
          K Offline
          kstls
          wrote on last edited by
          #4

          There are lots of ways. You could use a

          While(true)
          {
          Your server code goes here;
          }

          When the server closes the connection and finishes it will start over and be ready to accept a new connection

          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