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

LinuxÍøÂç±à³ÌÒ»²½Ò»²½Ñ§ Ò첽ͨѶÁÄÌì³ÌÐòselect

ʲôÊÇÒ첽ͨѶ£¿
¾ÍÊÇͨѶÈÎÒâÒ»·½¿ÉÒÔÈÎÒâ·¢ËÍÏûÏ¢£¬ÓÐÏûÏ¢À´µ½Ê±»áÊÕµ½ÏµÍ³Ìáʾȥ½ÓÊÕÏûÏ¢¡£
ÕâÀïÒªÓõ½selectº¯Êý¡£Ê¹Óò½ÖèÈçÏ£º
1¡¢ÉèÖÃÒ»¸ö¼¯ºÏ±äÁ¿£¬ÓÃÀ´´æ·ÅËùÓÐÒªÅжϵľä±ú£¨file descriptors£º¼´ÎÒÃǽ¨Á¢µÄÿ¸ösocket¡¢ÓÃopen´ò¿ªµÄÿ¸öÎļþµÈ£©
2¡¢°ÑÐèÒªÅжϵľä±ú¼ÓÈëµ½¼¯ºÏÀï
3¡¢ÉèÖÃÅжÏʱ¼ä
4¡¢¿ªÊ¼µÈ´ý£¬¼´select
5¡¢Èç¹ûÔÚÉ趨µÄʱ¼äÄÚÓÐÈκξä±ú״̬±ä»¯Á˾ÍÂíÉÏ·µ»Ø£¬²¢°Ñ¾ä±úÉèÖõ½¼¯ºÏÀï
·þÎñÆ÷¶ËÔ´´úÂëÈçÏ£º
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MAXBUF 1024
/************¹ØÓÚ±¾Îĵµ********************************************
*filename: async-server.c
*purpose: ÑÝʾÍøÂçÒ첽ͨѶ£¬ÕâÊÇ·þÎñÆ÷¶Ë³ÌÐò
*wrote by: zhoulifa(zhoulifa@163.com) ÖÜÁ¢·¢(http://zhoulifa.bokee.com)
Linux°®ºÃÕß Linux֪ʶ´«²¥Õß SOHO×å ¿ª·¢Õß ×îÉó¤CÓïÑÔ
*date time:2007-01-25 21:22
*Note: ÈκÎÈË¿ÉÒÔÈÎÒ⸴ÖÆ´úÂë²¢ÔËÓÃÕâЩÎĵµ£¬µ±È»°üÀ¨ÄãµÄÉÌÒµÓÃ;
* µ«Çë×ñÑ­GPL
*Thanks to: Google.com
*Hope:Ï£ÍûÔ½À´Ô½¶àµÄÈ˹±Ï××Ô¼ºµÄÁ¦Á¿£¬Îª¿Æѧ¼¼Êõ·¢Õ¹³öÁ¦
* ¿Æ¼¼Õ¾ÔÚ¾ÞÈ˵ļç°òÉϽø²½¸ü¿ì£¡¸ÐлÓпªÔ´Ç°±²µÄ¹±Ï×£¡
*********************************************************************/
int main(int argc, char **argv)
{
    int sockfd, new_fd;
    socklen_t len;
    struct sockaddr_in my_addr, their_addr;
    unsigned int myport, lisnum;
    char buf[MAXBUF + 1];
    fd_set rfds;
    struct timeval tv;
    int retval, maxfd = -1;
    if (argv[1])
        myport = atoi(argv[1]);
    else
        myport = 7838;
    if (argv[2])
        lisnum = atoi(argv[2]);
    else
        lisnum = 2;
    if ((sockfd = socket(PF_INET, SOCK_STR


Ïà¹ØÎĵµ£º

LinuxÄÚºËÉ豸ģÐÍ(4)

ÒëÕߣº¹ùÉÙ±¯
2009/12/02
Ô­ÎÄ£ºlinux/Documentation/driver-model/class.txt
É豸Àà
½éÉÜ
~~~~
Ò»¸öÉ豸ÀàÃèÊöÁËÒ»ÀàµÄÉ豸£¬ÀýÈçÓïÒôÉ豸»òÕßÍøÂçÉ豸¡£ÏÂÃæÊÇÒѶ¨ÒåµÄÉ豸Àà:
<Insert List of Device Classes Here>
ÿ¸öÉ豸ÀඨÒåÁËÒ»Ì×Óï·¨ºÍÉ豸×ñÑ­µÄ±à³Ì½Ó¿Ú¡£É豸Çý¶¯¾ÍÊÇΪÌض¨×ÜÏßÉϵÄ
Ìض¨É豸¶ ......

ÓÃÈí¼þlm_sensors¼à²âLinuxϵͳºÍCPUζÈ

ÔÚLinuxÏÂÓиö½Ðlm_sensorsµÄÈí¼þ¿ÉÒÔ°ïÖúÎÒÃÇÀ´¼à¿ØÖ÷°å£¬CPUµÄ¹¤×÷µçѹ£¬·çÉÈתËÙ¡¢Î¶ȵÈÊý¾Ý¡£ÕâЩÊý¾ÝÎÒÃÇͨ³£ÔÚÖ÷°åµÄ
BIOSÒ²¿ÉÒÔ¿´µ½¡£µ±ÎÒÃÇ¿ÉÒÔÔÚ»úÆ÷ÔËÐеÄʱºòͨ¹ýlm_sensorsËæʱÀ´¼à²â×ÅCPUµÄζȱ仯£¬¿ÉÒÔÔ¤·ÀºÇ±£»¤ÒòΪCPU¹ýÈȶø»áÉÕµô¡£

1. °²×°lm_sensors

ÏÖÔÚ»ù±¾ÉÏÿ¸öLinux¶¼ÒѾ­ÓÐlm_senso ......

LAMP(Linux+Apache+MySQL+PHP)·þÎñÆ÷µÄÐÔÄÜÓÅ»¯

Ä¿Ç°LAMP (Linux + Apache + MySQL + PHP) ½ü¼¸ÄêÀ´·¢Õ¹Ñ¸ËÙ£¬ÒѾ­³ÉΪWeb ·þÎñÆ÷µÄÊÂʵ±ê×¼¡£LAMP 
Õâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹÓõģ¬µ«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ã µÄË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ