⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commuserverappdelegate.m

📁 针对于Communication通信中间件的Server端程序。
💻 M
字号:
////  CommuServerAppDelegate.m//  CommuServer////  Created by Owen.Qin on 9/24/08.//  Copyright __MyCompanyName__ 2008. All rights reserved.//#import "CommuServerAppDelegate.h"@implementation CommuServerAppDelegate@synthesize window;@synthesize _communicate, _arrayMsgMap;- (void)applicationDidFinishLaunching:(UIApplication *)application {		self._communicate = [[iCommunicate alloc] init];	self._arrayMsgMap = [NSMutableArray array];		// "register" message	iMapMsgIdAndCallBack* mapRegister = [[iMapMsgIdAndCallBack alloc] init];	mapRegister->_msgId = @"register";	mapRegister->_callback = (iCommCallBack)&callbackRegister;	[self._arrayMsgMap addObject:(id)mapRegister];	[mapRegister release];	// "TextChat" message	iMapMsgIdAndCallBack* mapTextChat = [[iMapMsgIdAndCallBack alloc] init];	mapTextChat->_msgId = @"TextChat";	mapTextChat->_callback = (iCommCallBack)&callbackTextChat;	[self._arrayMsgMap addObject:(id)mapTextChat];	[mapTextChat release];		[self._communicate startServerWithPort:5566 CallBack:(void*)self._arrayMsgMap];	// Override point for customization after app launch	    [window makeKeyAndVisible];}- (void)dealloc {	[self._arrayMsgMap release];	[self._communicate release];//	[self._mapIDCB release];	[window release];	[super dealloc];}static void callbackRegister(iMsg* msg){	CommuServerAppDelegate* delegate = [[UIApplication sharedApplication] delegate];	[delegate.window recvRegisterFromClient:msg];}static void callbackTextChat(iMsg* msg){	CommuServerAppDelegate* delegate = [[UIApplication sharedApplication] delegate];	[delegate.window recvTextChat:msg];}@end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -