摘要: tcp.h#import #import "AsyncSocket.h"@interface ViewController : UIViewController{ //客户端 AsyncSocket *_sendSocket; //服务端 AsyncSocket *_recvSocket; NSMutableArray *_socketArray;}@property (retain, nonatomic) IBOutletUITextField *ipField;@property (retain, nonatomic) IBOutletUITextField *send 阅读全文
posted @ 2013-10-25 16:42 野马&草原 阅读(303) 评论(0) 推荐(0)
摘要: 自带播放器#import "ViewController.h"@implementation ViewController- (void)viewDidLoad{ [superviewDidLoad];//// NSString* path = [[NSBundle mainBundle] pathForResource:@"test1" ofType:@"mp4"];// NSURL* url = [NSURL fileURLWithPath:path]; NSURL *url= [NSURLURLWithString:@" 阅读全文
posted @ 2013-10-25 16:39 野马&草原 阅读(1846) 评论(0) 推荐(0)
摘要: 定义一个NSObject的类对网络进行封装#import @classMyConnection;@protocol MyConnectionDelegate - (void)myConnectionDidFinish:(MyConnection*)con Data:(NSData*)data;- (void)myConnectionDidFailed:(MyConnection*)con;@end@interface MyConnection : NSObject{ NSMutableData* _mData;}@property (nonatomic, assign) int tag;@p. 阅读全文
posted @ 2013-10-25 16:29 野马&草原 阅读(283) 评论(0) 推荐(0)