Author Topic: Domain=NSPOSIXErrorDomain Code=54 "The operation couldn’t be completed  (Read 22780 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?

By participating in our community you can get free top level domain as well learn about Search Engine Optimization, Server management and more..
Join Now!