Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux Socket ѧϰ£¨Ê®£©


Linux Socket ѧϰ£¨Ê®£©
ÔÚÌ×½Ó¿ÚÉÏʹÓñê×¼I/O
ÔÚÇ°ÃæÕ½ڵÄÀý×Ó´úÂëÖÐÎÒÃÇÒѾ­Ê¹ÓÃÁËread(2)»òÊÇwrite(2)ϵͳµ÷ÓÃÔÚÌ×½Ó¿ÚÉÏÖ´ÐжÁÈ¡ºÍдÈë²Ù×÷¡£Õâ¸ö¹æÔòµÄÒ»¸öÀýÍâ¾ÍÊÇrecvfrom(2)ºÍsendto(2)º¯Êý£¬ÕâÁ½¸öº¯ÊýÓÃÀ´¶ÁдÊý¾Ý±¨¡£È»¶ø£¬Ê¹ÓÃreadºÍwritteº¯Êýµ÷ÓÃÈ´ÓÐһЩ³ÌÐòÉϵÄȱµã¡£
ÕâÒ»ÕÂÎÒÃǽ«»áÌÖÂÛÒÔÏÂÄÚÈÝ£º
ÈçºÎʹÓÃfdopen(3)½«Ò»¸öÌ×½Ó¿ÚÓëÒ»¸öFILEÁ÷Ïà¹ØÁª
ÈçºÎ´´½¨²¢¶ÁдFILEÁ÷
¹Ø±ÕÓëÌ×½Ó¿ÚÏà¹ØÁªµÄÁ÷µÄÎÊÌâ
ΪÎÒÃǵÄFILEÁ÷Ñ¡Ôñ²¢´´½¨ºÏÊʵĻº³å¼¼Êõ
ÖжÏϵͳµ÷ÓõÄÎÊÌâ
ÕÆÎÕÁËÕâЩÄÚÈݽ«ÎªÎÒÃÇÌṩ½â¾öÎÒÃÇÍøÂç³ÌÐòµÄ¶îÍâ·½·¨¡£
Àí½â±ê×¼I/OµÄÐèÒª
LinuxÖеÄstdio(3)³ÌÐò·ûºÏANSI C3.159-1989±ê×¼¡£Õâ¸ö½Ó¿ÚµÄ±ê×¼»¯¿ÉÒÔ°ïÖú³ÌÐò½«³ÌÐòÒÆÖ²µ½¶à¸öƽ̨¡£ÀýÈ磬µ±ÎÒÃÇÒª½«Ô´´úÂë´ÓÆäËûµÄUNIXϵͳÒÆÖ²µ½ÎÒÃÇ×Ô¼ºµÄLinuxƽ̨ʱ£¬Õâ¸ö³ÌÐò¶ÔÓÚÎÒÃÇÀ´ËµÒ²ÐíÓÐÓá£
stdio°ü±¾ÉíÊÇÓëreadºÍwritteµ÷ÓÃÏà³åÍ»¡£È»¶ø£¬ÎÒÃÇȴʹÓñê×¼µÄI/Oµ÷Óã¬ÒòΪ¸ù¾ÝÎÒÃdzÌÐòµÄÐèÒª£¬ËûÃÇ¿ÉÒÔ·½±ãµÄÿ´ÎΪÎÒÃÇÌṩһÐлòÊÇÒ»¸ö×Ö·û¡£ÀýÈ磬readµ÷Ó㬲¢²»»áΪÎÒÃǵijÌÐò·µ»ØÒ»¸öÎı¾ÐС£Ïà·´£¬ËûÃÇ·µ»Ø¾¡¿ÉÄܶàµÄÊý£¬ÉõÖÁÊǶàÐÐÎı¾¡£
µ±Ð´ÈëÌ×½Ó¿Úʱ£¬±ê×¼I/OÀý³Ì¿ÉÒÔÔÊÐíÎÒÃǵijÌÐòÿ´ÎдÈëÒ»¸ö×Ö·û£¬¶ø²»»áÔì³É´óµÄÄÚÈݸ²¸Ç¡£ÁíÒ»·½Ã棬ÿ´Îµ÷ÓÃwritteдÈëÒ»¸ö×Ö·û»¨·ÑÌ«´ó¡£±ê×¼I/Oº¯ÊýÔÊÐíÎÒÃǵijÌÐòʹÓúÏÊʵÄÊý¾Ýµ¥Ôª½øÐвÙ×÷¡£
stdioͬʱÎÒÃǵijÌÐòÌṩÁËÊý¾Ý»º³å¹¦ÄÜ£¬°üÀ¨ÊäÈëÓëÊä³ö¡£µ±Ê¹Óûº³å¹¦ÄÜ£¬¿ÉÒÔ¼«´óµÄ¸ÄÉÆÎÒÃdzÌÐòµÄÐÔÄÜ¡£²»ÐÒµÄÊÇ£¬»º³å»áΪijЩ¸ñʽµÄͨÐÅÔì³ÉÀ§ÄÑ£¬ËùÒÔ²¢²»ÊÇ×ÜÊÇʹÓûº³å¡£
ÔÚÕâÒ»ÕÂÎÒÃǼÙÉèÒѾ­ÊìϤÁËstdioµÄ»ù±¾¹¦ÄÜ¡£Õâͨ³£ÊÇÔÚC³ÌÐò½Ì³Ì£¬Í¬Ê±Ò²ÊÇCÓïÑÔ±¾ÉíËù½ÌµÄÄÚÈÝ¡£ÏàÓ¦µÄ£¬ÕâÒ»ÕÂÎÒÃǽ«»áרעÓÚÎÒÃÇÓ¦ÃÜÇйØ×¢µÄ¶«Î÷£¬¶øÆäËûµÄһЩϸ΢µÄµØ·½²¢²»Ã÷ÏÔ£¬ÒòΪËûÊÊÓÃÓÚÌ×½Ó¿Ú±à³Ì¡£
½«Ò»¸öÌ×½Ó¿ÚÓëÒ»¸öÁ÷Ïà¹ØÁª
stdioÁ÷ÊÇÓÉFILE¿ØÖÆ¿éÀ´½øÐйÜÀíµÄ¡£ÀýÈ磬ÎÒÃÇÒ²ÐíÒѾ­¶à´Î±àдÁËÈçÏÂËùʾµÄ´úÂ룺
FILE *in;
in = fopen(pathname,"r");
if ( in == NULL ) {
    fprintf(stderr,"%s: opening %s for read.\n",strerror(errno),pathname);
    exit(1);
}
ÔÚÕâ¸öÀý×ÓÖУ¬±äÁ¿pathnameËùÖ¸¶¨µÄÎļþ½«»á´ò¿ªÀ´¶Á¡£Èç¹ûopenµ÷Óóɹ¦£¬±äÁ¿in½«»á½ÓÊÕÒ»¸öÖ¸ÏòΪÎÒÃǹÜÀíÁ÷I/OµÄFILE½á¹¹¡£·ñÔò£¬±äÁ¿in½ÓÊÕÒ»¸öNULLÖ¸Õ룬¶øÎÒÃǵijÌÐòÒ²±ØÐë´¦Àí»òÊDZ¨¸æ


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

linuxÏÂifconfig, DNSÒÔ¼°routeÅäÖÃ

Ô­ÎÄ£ºhttp://www.cnitblog.com/201/archive/2009/08/20/60887.html
ÊìϤʹÓÃifconfig »á·Ç³£·½±ã¡£¡¡
¡¡ifconfig eth0 ÐÂip
¡¡¡¡È»ºó±à¼­/etc/sysconfig/network-scripts/ifcfg-eth0£¬ÐÞ¸Äip
¡¡¡¡Ò»¡¢ÐÞ¸ÄIPµØÖ·
¡¡¡¡[aeolus@db1 network-scripts]$ vi ifcfg-eth0
¡¡¡¡DEVICE=eth0
¡¡¡¡ONBOOT=yes
¡¡¡¡BOOTPROTO=s ......

linux telnet·þÎñ

Ò»¡¢Ê²Ã´ÊÇtelnet
      TelnetµÄÓ¦Óò»½ö·½±ãÁËÎÒÃǽøÐÐÔ¶³ÌµÇ¼£¬Ò²¸øhackerÃÇÌṩÁËÓÖÒ»ÖÖÈëÇÖÊֶκͺóÃÅ£¬µ«ÎÞÂÛÈçºÎ£¬ÔÚÄ㾡ÇéÏíÊÜTelnetËù´ø¸øÄãµÄ±ã½ÝµÄͬʱ£¬ÄãÊÇ·ñÕæÕýµÄÁ˽âTelnetÄØ£¿¡¡¡¡
¡¡¡¡¶þ Ô¶³ÌµÇ¼¡¡¡¡
¡¡¡¡Telnet·þÎñËäȻҲÊôÓÚ¿Í»§»ú/·þÎñÆ÷Ä£Ð͵ķþÎñ£¬µ«Ëü¸ü´óµÄÒâÒåÔ ......

ѧϰLINUX²½Ö裨ת£©

1¡¢Linux »ù´¡
°²×°Linux²Ù×÷ϵͳ LinuxÎļþϵͳ Linux³£ÓÃÃüÁî LinuxÆô¶¯¹ý³ÌÏê½â ÊìϤLinux·þÎñÄܹ»¶ÀÁ¢°²×°Linux²Ù×÷ϵͳ Äܹ»ÊìÁ·Ê¹ÓÃLinuxϵͳµÄ»ù±¾ÃüÁî ÈÏʶLinuxϵͳµÄ³£Ó÷þÎñ°²×°Linux²Ù×÷ϵͳ Linux»ù±¾ÃüÁîʵ¼ù ÉèÖÃLinux»·¾³±äÁ¿ ¶¨ÖÆLinuxµÄ·þÎñ Shell ±à³Ì»ù´¡Ê¹ÓÃvi±à¼­Îļþ ʹÓÃEmacs±à¼­Îļþ ʹÓÃÆäËû±à ......

ÔÚLinuxÉÏ°²×°RedmineÓëapacheÕûºÏ½øÐÐÏîÄ¿¹ÜÀí


°²×°
SVN
Õâ¸ö±È½Ï¼òµ¥£¬È¥
ÕâÀïÏÂÔØÔ´Âë
http://subversion.tigris.org/
 
×Ô¼º±àÒëÏÂ×°ºÃ¾ÍÊÇÁË¡£
¶ÔÓÚ
SVN
µÄÅäÖ㬽¨Òé²é¿´ÈçÏÂÁ¬½Ó£¬ËµµÄºÜÏêϸ£¬ÎÒÒ²²»ÔÚ¶à˵¹þ
~
http://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/#N10250
²»¹ý£¬ÓÐÒ»µã£¬Éϱß˵µÄ½øÐÐĿ¼·ÃÎÊ¿ØÖÆ
£¬Õâ¸ö±È½Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ