关于CAsyncSocket的问题

关于CAsyncSocket的问题

问题描述:

嗨.

CAsyncSocket出现了一个奇怪的问题.如果我连接到服务器并且没有执行发送"之类的操作,则似乎无法成功连接,因为我认为站在我这一边,我不会发送"SYNC"之类的信息.这似乎是在我不直接控制的TCPIP协议的较低层中发送的.我是否缺少套接字本身的某些设置?如果我打电话给发送",那就可以了.如果没有,我将被切断.

不知道是否有人有类似的东西.

提前谢谢.

Stan the man

Hi.

I got a strange issue with CAsyncSocket. If I connect to a server and I do not do a "send" or something, I can not seem to connect successfully because I think on my side, I will not send a "SYNC" or something. THis seems to be something that is sent in the lower layers of the TCPIP protocol which I do not control directly. Am I missing some setting for the socket itself? If I do a call to "Send", then it is OK. If not, I will just get cut off.

Dont know if anyone had had anything similar.

Thanks in advance.

Stan the man

您可能正在寻找SO_KEEPALIVE

http://msdn.microsoft.com/en-us/library/1s9cycf8 (v = vs.71).aspx [
You might be looking for SO_KEEPALIVE

http://msdn.microsoft.com/en-us/library/1s9cycf8(v=vs.71).aspx[^]