Prem Kumar
Prem Kumar

Reputation: 11

CocoaAsyncSocket establish multiple connections

While trying to establish multiple TCP connections am getting "Attempting to connect while connected or accepting connections. Disconnect first" error, Please suggest me how to establish 2 or more live TCP connections using CocoaAsyncSocket.

Upvotes: 0

Views: 214

Answers (1)

Prem Kumar
Prem Kumar

Reputation: 11

Create and use another GCDAsyncSocket instance if you are using GCDAsyncSocket library(if you are using NSStream also same process), you can differentiate TCP connection messages with connectedHost.

Upvotes: 1

Related Questions