wifi network - problems opening streams

Posts: 8
Joined: 2008.10
Post: #1
I use NSNetServiceBrowser to find other device, do resolveWithTimeout to connect. All this works fine, netServiceDidResolveAddress gets called, then I open streams, and here is the problem - sometimes NSStreamEventOpenCompleted comes right away and everyting works fine, but sometimes it takes minute or so before openComplete, often it newer completes and no events received.
What can be a reason? Is this caused by something happening in the WIFI device?

here is how I open the streams:
- (void) openStreams
    _inStream.delegate = self;
    [_inStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    [_inStream open];
    _outStream.delegate = self;
    [_outStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    [_outStream open];

Same behavior seems to be happening when I try WiTap and TouchFighter examples. And, everything works fine if I create WiFi network on my Mac and connect to it with two iPhones. Is it my WiFi router problem (NETGEAR MR814v2)?
Appreciate any help/ideas. Thanks!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Online and wifi games GregX999 3 4,210 Jul 16, 2009 06:08 PM
Last Post: GregX999
  2 players on wifi ichocobo 3 6,310 Apr 20, 2009 06:01 AM
Last Post: drego1983
  basic wifi question wonza 0 2,964 Feb 14, 2009 05:03 PM
Last Post: wonza
  Error in opening the game macmini 3 3,930 Dec 27, 2008 09:01 AM
Last Post: riruilo
  read wifi/hotspots-names - how? gamela1n 3 4,514 Jul 28, 2008 10:36 AM
Last Post: AnotherJake