开发者

asyncsocket accepts socket but doesn't connect to host

I've just started running (what I thought was) a basic asyncsocket in my objective-c app and I'm getting the didAcceptNewSocket: message when connecting with telnet, but then I'm abruptly disconnected ("Connection closed by foreign ho开发者_Go百科st") without reaching the didConnectToHost: message. It works fine in the example and I've tried to replicate everything I see there to no avail.

Is there some simple pitfall I should be avoiding? Any other way I can debug this problem?


In this case, I was using the wrong delegate methods copied/pasted from some other site. Always check your headers!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜