Link to home
Start Free TrialLog in
Avatar of wuxz
wuxz

asked on

How to set timeout option of a socket?

Hi,

I want to set the timeout option of a socket, given a socket handle. I us my own protocol other than http. Can anyone help me?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of kakamna
kakamna

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MichaelS
MichaelS

You have to use setsockopt() function with proper arguments. If you use MFC then there is function CAsyncSocket::SetSockOpt()
Avatar of wuxz

ASKER

Thank you, I find that I have missed those two options in document.

Regards
wu xz