Symbian C/S »úÖÆ·ÖÎö
ÒÔÏ·ÖÎö»ùÓÚ£º
Developer Platform :S60 3rd Edition, Feature Pack 2 SDK
Operating System :Symbian OS v9.3
Ò»£¬ÎªÊ²Ã´ÒªÊ¹ÓÃClient/Server¼Ü¹¹
ÔÚSymibian OSÖÐËùÓеÄÒì²½·þÎñ¶¼ÊÇServerͨ¹ýC/S¼Ü¹¹À´ÊµÏֵġ£ClientÊÇÀûÓÃServerÌṩµÄÌض¨·þÎñµÄ³ÌÐò£¬Server½ÓÊÜÀ´ÖÁClientµÄÇëÇóÏûÏ¢²¢Í¬²½»òÒì²½µÄ´¦ÀíËûÃÇ¡£C/S¼Ü¹¹ÓÐÈçϵÄÓŵ㣺
1£¬¿ÉÀ©Õ¹ÐÔ
2£¬ÓÐЧÐÔ£ºÏàͬµÄServer¿ÉÒÔ·þÎñ¶à¸öClient¡£
3£¬°²È«ÐÔ£ºServerºÍClient´æÔÚÓÚµ¥¶ÀµÄ½ø³ÌÖУ¬²¢ÇÒͨ¹ýÏûÏ¢´«µÝ½øÐÐͨÐÅ¡£¾ßÓдíÎóÐÐΪClient²»»áʹËûµÄServer±ÀÀ££¨µ«ÊÇ£¬Server¿ÉÒÔͨ¹ý¿Í»§Ï̵߳ľä±úÀ´ÊǾßÓдíÎóÐÐΪµÄClient²úÉúÑÏÖØ´íÎ󣩡£
4£¬Òì²½ÐÔ£ºÔÚ·þÎñÆ÷Íê³ÉÇëÇóµÄʱºòʹÓÃAO»úÖÆÀ´Í¨ÖªËûµÄClient¡£Í¨¹ýAOÀ´¹ÒÆðÏ̶߳ø²»ÊÇÂÖѯÇëÇóµÄ״̬£¬SymbianOS¼õÉÙÁË´¦Àí¸ÃÇëÇóµÄ´¦ÀíÆ÷ÖÜÆÚ£¬´Ó¶ø½ÚÔ¼Á˵çÔ´£¬Õâ¶ÔÓÚÒƶ¯É豸À´ËµÊǷdz£ÖØÒªµÄ¡£
¶þ£¬Client/Server¼Ü¹¹µÄ´¦ÀíÁ÷³Ì
ClinetºÍServer´¦ÓÚ²»Í¬µÄ½ø³ÌÖУ¬ËûÃÇÎÞ·¨·ÃÎʱ˴˵ÄÐéµØÖ·¿Õ¼ä£¬ËùÒÔËûÃÇʹÓÃÏûÏ¢´«µÝÐÒéÀ´Í¨ÐÅ£¬ÕâÖÖͨÐŵÄÇþµÀ¾Í³ÆΪ»á»°¡£»á»°ÓÉÄں˴´½¨£¬Í¬Ê±Äں˻¹ÔÚËùÓеÄClient/ServerͨÐÅÖг䵱ý½é¡£
·þ Îñ£¬ÌرðÊÇϵͳÌṩµÄ·þÎñ£¬±ÈÈ磺Îļþ·þÎñ£¬´°¿Ú·þÎñºÍ×ÖÌåºÍλͼ·þÎñµÈ¶¼ÊÇÔÚϵͳÆô¶¯µÄʱºò¾ÍÆô¶¯ÁË¡£µ±È»Èç¹ûÊÇ×Ô¼º×öµÄserver¿ÉÒÔÔÚÐèÒªµÄʱ ºò£¬¼´µ±ÓÐclient·¢³öÇëÇóµÄʱºòÔÙÆô¶¯¡£È»ºó·þÎñÆ÷×èÈûÔÚij¸öµãÉÏ£¬µÈ´ýclientÇëÇóµÄµ½À´¡£ÔÚClient·¢³öÒ»¸öÇëÇóºó£¬·þÎñÆ÷»ánewÒ» ¸ö×ӻỰÀ´´¦ÀíÕâ¸öclientµÄÇëÇó£¬È»ºó×Ô¼ºÓÖ¼ÌÐø×èÈûÔÚ¼àÌýÇëÇóµÄµãÉÏ£¬ÒÔÂú×ãÆäËûClientµÄÇëÇó¡£Ã¿¸öClientºÍServerµÄºóÐø½»»¥ ¶¼ÊÇͨ¹ýÁ¬½ÓServerʱ´´½¨µÄSessionÀ´Íê³ÉµÄ¡£
Èý£¬RÀà½éÉÜ
C/S¼Ü¹¹Ãâ²»ÁËҪʹÓÃRÀ࣬ÄÇôʲôÊÇRÀàÄØ£¿ÕâÀïµÄ"R"ÊÇResourceµÄµÚÒ»¸ö×Öĸ£¬ÊÇ×ÊÔ´µÄÒâ˼¡£
1£¬¼ò½é
¾ßÓÐ"R"ǰ׺µÄÀà±íʾij¸ö×ÊÔ´µÄ¿Í»§¶Ë¾ä±ú¡£Ó¦ÓóÌÐòʵ¼ÊÉϲ¢²»ÓµÓÐ×ÊÔ´£¬×ÊÔ´ÓÉÉ豸ÉÏÒ»¸öSymbian OS ·þÎñÆ÷ËùÓµÓУ¬·þÎñÆ÷¹ÜÀí×ÊÔ´µÄʹÓ᣿ͻ§¿ÉÒÔʹÓÃÕâЩ¾ä±ú·ÃÎÊ·þÎñÆ÷¹ÜÀíµÄ×ÊÔ´£¬²¢ÇëÇóʹÓÃËüµÄ¹¦ÄÜ¡£
R ÀàûÓÐÈκι«¹²µÄ»ùÀ࣬ÓÐЩ·Ö¿éµÄÅÉϵÀ࣬±ÈÈ磬ÓÐЩÀàÊÇ´ÓRHandleBaseÅÉÉú—RFs£¬¶øÓеÄʲô¶¼²»ÊÇ—RWindowµÈ¡£Ò»°ãÀ´Ëµ£¬RÀàÊÇ ÔÚÕ»ÉÏʵÀý»¯»òÊÇǶÌ×ÔÚCÀàÖУ¬È»ºóͨ¹ýijÖÖ·½Ê½´ò¿ªËûÃÇ£¨Í¨³£Í¨¹ýÒ»¸ö·½·¨µ÷ÓÃÀ´´ò¿ª£¬ÀýÈçµ÷ÓÃOpen()»òConnect()£©¡£½áÊøʹÓÃËüÃÇʱ£¬ ÓбØҪʹ
Ïà¹ØÎĵµ£º
Á´±í¶¨Òå¼°²Ù×÷µÄÔ´Îļþ£ºemployee.h
//
#pragma once
#ifndef __EMPLOYEE_H__
#define __EMPLOYEE_H__
#include<stdio.h>
#include<malloc.h>
typedef struct employee{
int id;
int age;
int salary;
}EmpType;
typedef struct Node{
EmpType data;
struct Node *next;
}L ......
Ò»¸ö¶¨ÒåΪvolatileµÄ±äÁ¿ÊÇ˵Õâ±äÁ¿¿ÉÄܻᱻÒâÏë²»µ½µØ¸Ä±ä£¬ÕâÑù£¬±àÒëÆ÷¾Í²»»áÈ¥¼ÙÉèÕâ¸ö±äÁ¿µÄÖµÁË¡£¾«È·µØ˵¾ÍÊÇ£¬ÓÅ»¯Æ÷ÔÚÓõ½Õâ¸ö±äÁ¿Ê±±ØÐëÿ´Î¶¼Ð¡ÐĵØÖØжÁÈ¡Õâ¸ö±äÁ¿µÄÖµ£¬¶ø²»ÊÇʹÓñ£´æÔڼĴæÆ÷ÀïµÄ±¸·Ý¡£ÏÂÃæÊÇvolatile±äÁ¿µÄ¼¸¸öÀý×Ó£º
1). ²¢ÐÐÉ豸µÄÓ²¼þ¼Ä´æÆ÷£¨È磺״̬¼Ä´æÆ ......
curl c api
¹ØÓÚCurlµÄ½éÉܺܶ࣬ÕâÀï²»Ïêϸ½éÉÜ£¬Ö÷Ҫ̸һϼòµ¥Ó¦Óá£
×î½üÑо¿ÁËÒ»ÏÂLinuxϵÄcurl C API,curl c APIµÄÎĵµ±È½Ï·á¸»£¬Î¨Ò»¾ÍÊDzéÕÒÆðÀ´£¬·ÑЩʱ¼ä¡£CurlµÄC APIºÍcurlµÄPHP API£¬º¯Êý½Ó¿ÚºÍ×÷ÓôóÖÂÏàͬ£¬ËùÒÔÈç¹ûÓÐPHP APIʹÓþÑéÓ¦¸ÃºÜºÃÀí½â¡£
1£ºCURLcode curl_global_init(long flags);º¯ ......
C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
1. fcloseº¯Êý
fcloseº¯ÊýµÄ¹¦ÄÜÊǹرÕÒ»¸öÁ÷£¬ÆäÓ÷¨ÊÇ£ºint fclose(FILE *stream); ³ÌÐòÀý×ÓÈçÏ£º
#include <string.h& ......
C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
1. kbhitº¯Êý
kbhitº¯ÊýÊǼì²éµ±Ç°°´Ïµļü£¬ÆäÓ÷¨Îª£ºint kbhit(void);³ÌÐòÀý×ÓÈçÏ£º
#include <conio.h>
int main(void)
{
c ......