portWithMachPort:
指定したマークポートでポートを返します
+(NSPort *)portWithMachPort:(int)machPort:
解説
指定したマークポートでポートを返します。
返り値
( NSPort * )
ポート
引数
( int )machPort
マークポート
フレームワーク
Foundation
クラス
NSMachPort
Class Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { int i; for (i=1 ; i<50000 ; i++){ if ([[NSMachPort portWithMachPort:i] isKindOfClass: [NSMachPort class]]) { NSPort *port = [[NSMachPort portWithMachPort:i] retain]; NSLog(@"%d , %@",i,[port description]); } } } @end