• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1595
  • Last Modified:

Winsock connect timeout in CSocket

I am using MFC and the CSocket class in the program I am currently working on.  When the program starts, it causes a non-connected client to invoke RAS for a connection.  This length of this process is variable and sometimes results in
a timeout.  Do you know of a way to read and set the value of this timeout setting?

The SetSockOpt in the CAsyncSocket: class does not support the SO_SNDTIMEO command.  Besides, can a CAsyncSocket call used when I am planning to use CSocket class based connections?
0
bobd
Asked:
bobd
1 Solution
 
mbhaktaCommented:
Try the CAsyncSocket::SetSockOpt() call. This has parameters related to change of time-outs.

0
 
bobdAuthor Commented:
Edited text of question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now