文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>创建与服务器的输入输出流

创建与服务器的输入输出流

时间:2011-03-18  来源:吴海平iOS

 1 - (void)GetStreamsToHost:(NSString *)aHost Port:(NSInteger)aPort InputStream:(NSInputStream **)aInputStream OutputStream:(NSOutputStream **)aOutputStream
2 {
3 CFReadStreamRef bRead;
4 CFWriteStreamRef bWrite;
5
6 bRead = NULL;
7 bWrite = NULL;
8
9 CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)aHost, aPort,
10 ((aInputStream != nil) ? &bRead : NULL),
11 ((aOutputStream != nil) ? &bWrite : NULL));
12
13 if (aInputStream != NULL) {
14 *aInputStream = [NSMakeCollectable(bRead) autorelease];
15 }
16 if (aOutputStream!= NULL) {
17 *aOutputStream = [NSMakeCollectable(bWrite) autorelease];
18 }
19 }
相关阅读 更多 +
排行榜 更多 +
僵尸运行3d城市逃生

僵尸运行3d城市逃生

冒险解谜 下载
顶尖猎人罗迪和凯茜

顶尖猎人罗迪和凯茜

冒险解谜 下载
火柴人飞爪忍者

火柴人飞爪忍者

冒险解谜 下载