macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

acceptConnectionInBackgroundAndNotifyForModes:

Index>Foundation>NSFileHandle

非同期で、ストリーム型ソケットとの接続をバックグラウンドで関係を受け入れます
-(void)acceptConnectionInBackgroundAndNotifyForModes:(NSArray *)modes:

解説

非同期で、ストリーム型ソケットとの接続をバックグラウンドで関係を受け入れ、接続のクライアント側を表すNSFileHandleを(NSFileHandleConnectionAcceptedNotification)で返します。
詳細はacceptConnectionInBackgroundAndNotifyを見てください。
【通知】
●NSFileHandleConnectionAcceptedNotificationのuserInfo
   NSFileHandleNotificationFileHandleItem ソケット接続のクライアント側を表す(NSFileHandle)
   NSFileHandleNotificationMonitorModes 通知をポストすることができる実行ループの配列(NSArray)

返り値

( void )

なし

引数

( NSArray * )modes

モードrun-loop mode

クラス

NSFileHandle

Instance Methods

使用可能

10.0

参照

- enqueueNotification:postingStyle:coalesceMask:forModes:(NSNotificationQueue)
-readInBackgroundAndNotifyForModes:
-readToEndOfFileInBackgroundAndNotifyForModes:

例文

[handle10  acceptConnectionInBackgroundAndNotifyForModes:[NSArray arrayWithObject:NSEventTrackingRunLoopMode]];