Click here to Skip to main content
15,434,532 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDisplay CBitmap into CStatic [modified] Pin
_Flaviu6-Jun-11 1:54
Member_Flaviu6-Jun-11 1:54 
AnswerRe: Display CBitmap into CStatic Pin
Roger Allen6-Jun-11 2:24
MemberRoger Allen6-Jun-11 2:24 
GeneralRe: Display CBitmap into CStatic Pin
_Flaviu6-Jun-11 2:39
Member_Flaviu6-Jun-11 2:39 
QuestionCStatic ModifyStyle Pin
_Flaviu6-Jun-11 1:00
Member_Flaviu6-Jun-11 1:00 
AnswerRe: CStatic ModifyStyle Pin
The_Inventor6-Jun-11 20:41
MemberThe_Inventor6-Jun-11 20:41 
AnswerRe: CStatic ModifyStyle Pin
Code-o-mat7-Jun-11 22:59
MemberCode-o-mat7-Jun-11 22:59 
QuestionHow to use tcp keepalive to check the client is alive? Pin
wangningyu4-Jun-11 23:23
Memberwangningyu4-Jun-11 23:23 
AnswerRe: How to use tcp keepalive to check the client is alive? Pin
Code-o-mat5-Jun-11 22:55
MemberCode-o-mat5-Jun-11 22:55 
MSDN[^] states:
If a connection is dropped as the result of keep-alives the error code WSAENETRESET is returned to any calls in progress on the socket, and any subsequent calls will fail with WSAENOTCONN.

If keep-alive is enabled for a TCP socket with SO_KEEPALIVE, then the default TCP settings are used for the keep-alive timeout and interval unless these values have been changed by calling the WSAIoctl function with the SIO_KEEPALIVE_VALS option.


Also, here[^] it says:
For TCP, the default keep-alive timeout is 2 hours and the keep-alive interval is 1 second. The default number of keep-alive probes varies based on the version of Windows.

Also, this[^] states:
KeepAliveTime
Specifies how often TCP sends keep-alive transmissions. TCP sends keep-alive transmissions to verify that an idle connection is still active.
This entry is used when the remote system is responding to TCP...


and here[^]:
KeepAliveInterval
Specifies how often TCP repeats keep-alive transmissions when no response is received.


So this whole thing boils down -to me at least- to this:
1. If this is enabled you will receive WSAENETRESET or WSAENOTCONN if you try to read or write the socket in case the "other side" disappeared.
2. By default, the system "pings" the other side every 2 hours, if no answer is received it will start "pinging" it every second who-knows-how many times before giving up. 2 hours is a lot of time, you might want to shorten that.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<

GeneralRe: How to use tcp keepalive to check the client is alive? Pin
Emilio Garavaglia6-Jun-11 3:41
MemberEmilio Garavaglia6-Jun-11 3:41 
GeneralRe: How to use tcp keepalive to check the client is alive? Pin
Code-o-mat6-Jun-11 3:58
MemberCode-o-mat6-Jun-11 3:58 
AnswerRe: How to use tcp keepalive to check the client is alive? Pin
jschell6-Jun-11 9:07
Memberjschell6-Jun-11 9:07 
Questionmysql error and UNICODE Pin
includeh104-Jun-11 18:44
Memberincludeh104-Jun-11 18:44 
AnswerRe: mysql error and UNICODE Pin
Code-o-mat5-Jun-11 22:26
MemberCode-o-mat5-Jun-11 22:26 
QuestionIs it possible to set another visual style only for my application [modified] Pin
Cold_Fearing_Bird4-Jun-11 16:59
MemberCold_Fearing_Bird4-Jun-11 16:59 
AnswerRe: Is it possible to set another visual style only for my application Pin
Rotted Frog6-Jun-11 20:46
MemberRotted Frog6-Jun-11 20:46 
Question[Win32] How draw a rectangle on the desktop Pin
Member 29654714-Jun-11 9:34
MemberMember 29654714-Jun-11 9:34 
QuestionRe: [Win32] How draw a rectangle on the desktop Pin
Mark Salsbery4-Jun-11 11:16
MemberMark Salsbery4-Jun-11 11:16 
AnswerRe: [Win32] How draw a rectangle on the desktop Pin
Member 29654714-Jun-11 11:51
MemberMember 29654714-Jun-11 11:51 
GeneralRe: [Win32] How draw a rectangle on the desktop Pin
Mark Salsbery4-Jun-11 11:56
MemberMark Salsbery4-Jun-11 11:56 
AnswerRe: [Win32] How draw a rectangle on the desktop Pin
bob169725-Jun-11 4:40
Memberbob169725-Jun-11 4:40 
QuestionEncryption/Decryption on html file? Pin
Le@rner3-Jun-11 20:04
MemberLe@rner3-Jun-11 20:04 
AnswerRe: Encryption/Decryption on html file? Pin
Mark Salsbery3-Jun-11 20:27
MemberMark Salsbery3-Jun-11 20:27 
GeneralRe: Encryption/Decryption on html file? Pin
Le@rner3-Jun-11 21:39
MemberLe@rner3-Jun-11 21:39 
AnswerRe: Encryption/Decryption on html file? Pin
Philippe Mori4-Jun-11 16:47
MemberPhilippe Mori4-Jun-11 16:47 
AnswerRe: Encryption/Decryption on html file? Pin
Philippe Mori4-Jun-11 16:53
MemberPhilippe Mori4-Jun-11 16:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.