Author Topic: Domain=NSPOSIXErrorDomain Code=54 "The operation couldn’t be completed  (Read 35885 times)

rahul

  • Newbie
  • *
  • Posts: 16
Hello friends
i am using CoreFoundation api following is my code
Code: [Select]
- (void)TcpClientInitialise
{

    CFReadStreamRef readStream;
    CFWriteStreamRef writeStream;


    CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)@"192.168.0.104",2000, &readStream, &writeStream);
    NSLog(@"Tcp Client Initialise");
    inputStream = (__bridge NSInputStream *)readStream;
    outputStream = (__bridge NSOutputStream *)writeStream;

[inputStream setDelegate:self];
[outputStream setDelegate:self];

[inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];

[inputStream open];
[outputStream open];
}
this is working fine but the problem is when i use this methos again it show me error
Domain=NSPOSIXErrorDomain Code=54 "The operation couldn’t be completed   can please some one help me why i am getting this problem

 

X

Do you know?

IfAndBut.com gives you a platform where you can ask questions related to web and internet..
So, why wait..
Join Now!
anything