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. Blocking in CSocket

Blocking in CSocket

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminquestion
6 Posts 3 Posters 1 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.
  • Z Offline
    Z Offline
    zahid_ash
    wrote on last edited by
    #1

    HI, I am using a class derived from CSocket in my application. As when the Socket is sending or reciveing a data and the data not came then it gets blocked. There is a CancelBlocking method in the CSocket. But how can I programaticaly handle it, when one of the application Client or Server stops sending or recieving dta then other application should not gets blocked. any idea / link Thanks Regards.

    L 1 Reply Last reply
    0
    • Z zahid_ash

      HI, I am using a class derived from CSocket in my application. As when the Socket is sending or reciveing a data and the data not came then it gets blocked. There is a CancelBlocking method in the CSocket. But how can I programaticaly handle it, when one of the application Client or Server stops sending or recieving dta then other application should not gets blocked. any idea / link Thanks Regards.

      L Offline
      L Offline
      Laxman Auti
      wrote on last edited by
      #2

      zahid_ash wrote:

      when one of the application Client or Server stops sending or recieving dta then other application should not gets blocked.

      Try the CAsyncSocket Class. Knock out 't' from can't, You can if you think you can :cool:

      Z 1 Reply Last reply
      0
      • L Laxman Auti

        zahid_ash wrote:

        when one of the application Client or Server stops sending or recieving dta then other application should not gets blocked.

        Try the CAsyncSocket Class. Knock out 't' from can't, You can if you think you can :cool:

        Z Offline
        Z Offline
        zahid_ash
        wrote on last edited by
        #3

        I have already used CSocket in my project. Should I replace CSocket word with CAsyncSocket , woiuld it not disturb the project. or how can I handle this with CSocket? Regards.

        L 1 Reply Last reply
        0
        • Z zahid_ash

          I have already used CSocket in my project. Should I replace CSocket word with CAsyncSocket , woiuld it not disturb the project. or how can I handle this with CSocket? Regards.

          L Offline
          L Offline
          Laxman Auti
          wrote on last edited by
          #4

          zahid_ash wrote:

          I have already used CSocket in my project. Should I replace CSocket word with CAsyncSocket , woiuld it not disturb the project. or how can I handle this with CSocket?

          Try it.. As the CSocket is derived from CAsyncSocket class Knock out 't' from can't, You can if you think you can :cool:

          Z 1 Reply Last reply
          0
          • L Laxman Auti

            zahid_ash wrote:

            I have already used CSocket in my project. Should I replace CSocket word with CAsyncSocket , woiuld it not disturb the project. or how can I handle this with CSocket?

            Try it.. As the CSocket is derived from CAsyncSocket class Knock out 't' from can't, You can if you think you can :cool:

            Z Offline
            Z Offline
            zahid_ash
            wrote on last edited by
            #5

            Can i handle this blocking and cancel blocking in CSocket. Can the timer be helpfull , means if in specific time nothing has been recived or sent then socket use the cancel blocking or so ? Regards.

            M 1 Reply Last reply
            0
            • Z zahid_ash

              Can i handle this blocking and cancel blocking in CSocket. Can the timer be helpfull , means if in specific time nothing has been recived or sent then socket use the cancel blocking or so ? Regards.

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

              Hi, yes you can i.e. CreateEvent and use WaitForSingleObject( HANDLE hHandle, DWORD dwMilliseconds ). ----------- Mila

              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