systemDefaultPortNameServer
調査中
解説
調査中
デフォルトのポートネームサーバを返します。
返り値
( NSPortNameServer * )
ポートネームサーバー
引数
フレームワーク
Foundation
クラス
NSPortNameServer
Class Methods
使用可能
10.0
参照
例文
#import "Controller.h" //mi @implementation Controller - (IBAction)pushButton:(id)sender { id server; NSSocketPort *port = [[NSSocketPort alloc] initRemoteWithTCPPort:80 host:@"www.oomori.com" ]; NSConnection *connection = [NSConnection connectionWithReceivePort:nil sendPort:port]; NSPortNameServer *spns = [NSPortNameServer systemDefaultPortNameServer]; ([spns registerPort:port name:@"www.oomori.com" ]) ? NSLog(@"YES") : NSLog(@"NO"); NSLog ([NSString stringWithFormat:@"%d",[port protocol]]); NSLog ([spns description]); } @end