Hello friends
i am using CoreFoundation api following is my code
- (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