Announcement

Collapse
No announcement yet.

Giving Socket options in TCP OPEN

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Giving Socket options in TCP OPEN

    Hi All,
    maybe one of you already faced such problem.
    I'd like to activate the %SO_KEEPALIVE socket option while opening a socket, in order to have the operating system TCP stack check if a opened onnection is still alive automatically.

    In my case I cannot simply solve the problem of dead peer detection with just sending some request to the other party and timeout for the answer (i.e. a sort of TCP "ping") cause the other device I'm communicating prevents this.

    In "classical" C sockets programming I'd be setting the %SO_KEEPALIVE option, but Powerbasic (luckly and unluckly in this case) masks the Winsock2 programming hurdles.

    Any ideas?
    O'course, if possible, I'd like to avoid implementing from "scratch" the equivalent of Powerbasic TCP OPEN & Co. routines with plain Winsock2 API calls.
    ))

    Thanks for your time and help

    Best regards,
    Angelo Amoruso

  • #2
    Since you are using the PB "TCP ...." functions this would be a good question to ask the PB Support Department; but this is board is not an official means of communicating with them.

    You should send your request directly to [email protected].
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      .. cause the other device I'm communicating prevents this
      If you ping the other app on the same port and it doesn't communicate isn't it gone? Can't this be done in a timer, now?

      Comment


      • #4
        Originally posted by Michael Mattias View Post
        Since you are using the PB "TCP ...." functions this would be a good question to ask the PB Support Department;

        You should send your request directly to [email protected].
        Thanks, I've just sent a support query to them, would let you know the results.

        Regards,
        Angelo

        Comment


        • #5
          Originally posted by angelo amoruso View Post
          cause the other device I'm communicating prevents this.
          I may be wrong but I think this is the problem, ie both computers need it turned on (is off by default) more reading of RFC 1122, section 4.2.3.6, "TCP Keep-Alives" may be helpful . Anyway it is a driver call to WskControlSocket
          that sets the state.
          PS don't tell Joe Byne you are considering using it or he will have his packet sniffers out looking for network degredation

          Comment

          Working...
          X