摘要:
1.同步请求ASIHTTPRequest*request= [ASIHTTPRequest requestWithURL:url]; [request setRequestMethod:@"GET"]; [request setTimeOutSeconds:50]; [reque... 阅读全文
posted @ 2014-04-13 22:33
离子
阅读(412)
评论(0)
推荐(0)
摘要:
1.同步请求 NSMutableURLRequest*urlrequest= [[NSMutableURLRequest alloc]init]; [urlrequest setURL:url]; [urlrequest setTimeoutInterval:60]; [urlreques... 阅读全文
posted @ 2014-04-13 19:56
离子
阅读(647)
评论(0)
推荐(0)
摘要:
1.http:协议的生命周期,就是一次请求和一次响应,它不会与服务器长时间连接,这个只能是客户端方发起消息2.scocket协议它是与服务器长时间连接,这个双方都可以互相发送消息 阅读全文
posted @ 2014-04-13 18:45
离子
阅读(187)
评论(0)
推荐(0)
摘要:
[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timeaction:) userInfo:@"liyang" repeats:NO]; NSTimer *tt= [NSTimer ti... 阅读全文
posted @ 2014-04-13 18:31
离子
阅读(1199)
评论(0)
推荐(0)
摘要:
//多线程的几种方式,多线程是在调用结束之后就销毁了,主线程一直都在运行之中,所以不会销毁主线程,只有后台挂起1.需要自己启动的方式 NSString *str=@"liyang"; NSThread *thread= [[NSThread alloc]initWithTarget:sel... 阅读全文
posted @ 2014-04-13 16:33
离子
阅读(237)
评论(0)
推荐(0)

浙公网安备 33010602011771号