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. Strange prob with Socket CAsyncSocket

Strange prob with Socket CAsyncSocket

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminperformancehelptutorialquestion
2 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.
  • S Offline
    S Offline
    Stan the man
    wrote on last edited by
    #1

    Hi. I have a straneg prob. I wrote a program that has a CAsyncOScket derived socket class. I will try to reconnect to a server every 1-3 sec IF it did not succeed in connecting or was disconnected. I keep track of the socket if after three sec and it DOES Not succeed, it will call Close on the present socket and then will call on the Create and then call on the Connect call. It will do this repeatedly until connection. Now, this should be pretty simple. But I am get a "Socket Notification Sink" dialog with error that says it can not write to some memory location. I am not sure whether I am approaching how to deal with what I want to do or maybe I am missing to call something else. Has anyone ever got this error? Thanks in advance.

    G 1 Reply Last reply
    0
    • S Stan the man

      Hi. I have a straneg prob. I wrote a program that has a CAsyncOScket derived socket class. I will try to reconnect to a server every 1-3 sec IF it did not succeed in connecting or was disconnected. I keep track of the socket if after three sec and it DOES Not succeed, it will call Close on the present socket and then will call on the Create and then call on the Connect call. It will do this repeatedly until connection. Now, this should be pretty simple. But I am get a "Socket Notification Sink" dialog with error that says it can not write to some memory location. I am not sure whether I am approaching how to deal with what I want to do or maybe I am missing to call something else. Has anyone ever got this error? Thanks in advance.

      G Offline
      G Offline
      Ghasrfakhri
      wrote on last edited by
      #2

      Hi use a pointer to CAsyncSocket & use new to create a instant of socket then after close delete the old one and create new CAsyncSocket instant. it maybe work!:^) Iman Ghasrfakhri

      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