最終更新:2012-09-25 (火) 00:29:46 (4193d)
NSSocketPort
Top / NSSocketPort
サンプル
NSSocketPort * serverSock = [[NSSocketPort alloc] initWithTCPPort: 8081]; NSFileHandle * socketHandle = [[NSFileHandle alloc] initWithFileDescriptor: [serverSock socket] closeOnDealloc: YES]; [socketHandle acceptConnectionInBackgroundAndNotify]; //NSNotificationCenterに追加 [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(notified:) name: NSFileHandleConnectionAcceptedNotification object: socketHandle];
http://culturedcode.com/cocoa/