- NSData *d = [writePipe readAllData];
- write(sockfd,[d bytes],[d length]);
+ const char *d = CFDataGetBytePtr((CFDataRef)writePipe->data);
+ state = ITInetSocketWriting;
+ NSLog(@"Writing");
+ [writePipe lockStream];
+ wpl = send(sockfd,d,wpl,0);
+ [writePipe shortenData:wpl];
+ [writePipe unlockStream];
+ [ap release];
+ ap = [[NSAutoreleasePool alloc] init];