无法打开连接流

时间:2014-01-28 16:31:46

标签: ios stream connection wifi exc-bad-access

您好我正在尝试建立与端口的连接,但每当代码运行时,我都会收到以下错误:thread 1 exc_bad_access

先谢谢

NSString *theTry=@"192.168.3.170:23"; 
    NSInputStream *iStream;
    NSURL *url = [NSURL URLWithString:theTry];

    [iStream initWithURL:url];
    [iStream setDelegate:self];
    [iStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    [iStream open];

0 个答案:

没有答案