c/s - C/C++ / ÐÂÊÖÀÖÔ°
±¾ÈËÓÐÒ»¸öCÏîÄ¿£¬ÒªÓõ½client-server,µ«ÊÇÒÔÇ°´Óû½Ó´¥¹ýc/sµÄ¶«Î÷£¬ÓÐûÓÐËÄÜÍƼöһЩºÃµÄÎÄÕ£¬ÎÄÕÂ×îºÃÄܾßÌå½âÊÍʵÏֵķ½·¨ºÍÔÀí¡£Ð»Ð»
http://www.cnki.com.cn/Article/CJFDTotal-KJIG200803068.htm
http://download.csdn.net/source/1099061
µ½ÍøÉÏËÑË÷һЩsocket·þÎñÆ÷±à³ÌµÄ¶«Î÷,Èç¹ûд¸ö¼òµ¥µÄsocket serverÖ»ÐèÒª½Óµ½socketÇëÇóºóÆðнø³Ì´¦Àí¾Í¿ÉÒÔÁË,Èç¹û¸´ÔӵĿÉÒÔʹÓÃһЩ¿ò¼Ü,±ÈÈçace,ÕâÑù¾Í¿ÉÒԱȽϼòµ¥µÄ±àд¸ßÐÔÄܵÄc.s server¶ËÁË,client¾Í±È½Ï¼òµ¥ÁËÁ¬ÉÏserverÊÕ·¢ÏûÏ¢¾Í¿ÉÒÔÁË
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÔÚ¸ùĿ¼/libÖдæ·ÅÒ»¸ölog.c£¬log.h£¬²¢ÓÃÏÂÃæµÄÓï¾ä£º
gcc -c log.c
ar crv liblog.a log.o
±àÒë³öÒ»¸öliblog.a¾²Ì¬¿â£¬È»ºóÔÚÎļþ¼Ð£º/testfileÖд´½¨Ò»¸ötest.cºÍtestc.c£¬test.cÖÐÒýÓÃÁËtestc.cÖж¨ÒåµÄ·½·¨ ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆ̨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£ ......
ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë
Äã²»Àí½âÖ ......