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. Client server problem

Client server problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++sysadminquestion
3 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
    VBZ
    wrote on last edited by
    #1

    hi ppl, I am creating a Client server application using Asyncsockets using MFC. my application is running well on the local server. but the problem starts when it's client side is used on other computers on lan Like for the first time the client connects to the server every thing goes on smoothly but when the connection closes from the client side the server closes all the connection but on the client side the connection goes to the FIN_WAIT2 and reamins there and no message can be sent from there on so the application halts. I donn know what to do help me?

    T 1 Reply Last reply
    0
    • V VBZ

      hi ppl, I am creating a Client server application using Asyncsockets using MFC. my application is running well on the local server. but the problem starts when it's client side is used on other computers on lan Like for the first time the client connects to the server every thing goes on smoothly but when the connection closes from the client side the server closes all the connection but on the client side the connection goes to the FIN_WAIT2 and reamins there and no message can be sent from there on so the application halts. I donn know what to do help me?

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      ok i think i also faced similar situation when i encounter this problem. the solution is that you override the function OnClose() of AsyncSocket of MFC and In OnClose() close the socket connectiong socket ok i think it work:rose: Alok Gupta visit me at http://alok.stormpages.com

      V 1 Reply Last reply
      0
      • T ThatsAlok

        ok i think i also faced similar situation when i encounter this problem. the solution is that you override the function OnClose() of AsyncSocket of MFC and In OnClose() close the socket connectiong socket ok i think it work:rose: Alok Gupta visit me at http://alok.stormpages.com

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

        hi alok, thanks a lot for ur reply, but eventually i figured out my problem was not related with opening or closing but what i am using is ASyncSockets which are by default NON blocking sockets as a results the connection closes automatically if there is no buffer recieved so i used CSocket class ie a Blocking Socket class as a result untill unless the Buffer is recieved the connection is alive. thanks a lot again

        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