开发者

NSStream Response Time

My current requirement is to send some command to a set of ip addresses on some particular port, and as per the response, detect devices(say for example detecting a wifi printer on the network by pinging it on a particular port with a status开发者_高级运维 command)

For this I am creating NSStreams, and everything is working peacefully with reading and writing data by NSInputSteam/NSOutputStream.

The only problem is that its taking too long for the response to come back when its an error and it doesnt find the 'intended' device.

I am assuming the input stream must be waiting for the response, and times out after a certain time interval if it doesnt get anything. So is there any way to control that 'time out' interval? So that this scanning process can be done in a few minutes rather than an hour.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜