最終更新:2012-09-25 (火) 00:29:46 (2554d)  

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/

関連