In AsyncSocket framework, how to do more than one

2019-05-31 23:51发布

I am now using AsyncSocket for iPhone socketing connection development. http://code.google.com/p/cocoaasyncsocket/

But I am having problem that, how to connect 2 multi-server to collect data from server?

I have host IP address A: 201.22.33.XXX.XX and host IP address B: 202.33.XXX.XX

I can success connect one server to collect data. But how to collect both server at the same time?

I tried create two socket objects with their own delegates, my path is like that:
step 1 ---- Connect to A step 2 ---- Connect to B Step 3 ---- Disconnect B but at this moment when i disconnect B, A also disconnected....

Please help.

1条回答
▲ chillily
2楼-- · 2019-06-01 00:20

You'll need to create two socket objects with their own delegates. I have several applications that connect to multiple servers at once.

查看更多
登录 后发表回答