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

Ò»¸ö¼òµ¥µÄlinuxÏÂÍøÂç³ÌÐòʵÀý£­ÍøÂç±à³ÌÈëÃÅ ÊÕ²Ø


http://blog.csdn.net/manio/archive/2006/10/13/1333202.aspx
/*
 server 
*/
#include 
<
stdio.h
>
#include 
<
sys
/
types.h
>
#include 
<
netinet
/
in
.h
>
#include 
<
sys
/
socket.h
>
#include 
<
netdb.h
>
#include 
<
unistd.h
>
#include 
<
string
.h
>
#include 
<
arpa
/
inet.h
>
#define
 PORT 8848
#define
 BACKLOG 1
main()
{
    
int
 listenfd,connectfd;
    
struct
 sockaddr_in server;
    
struct
 sockaddr_in client;
    
int
 sin_size;
    
if
 (( listenfd 
=
 socket(AF_INET, SOCK_STREAM, 
0
)) 
==
 
-
1
)
    {
        perror(
"
Creating socket failed.
"
);
        
return
 
0
;
    }
    
int
 opt 
=
 SO_REUSEADDR;
    setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, 
&
opt, 
sizeof
(opt));
    bzero(
&
server,
sizeof
(server));
    server.sin_family 
=
 AF_INET;
    server.sin_port 
=
 htons(PORT);
    server.sin_addr.s_addr 
=
 htonl(INADDR_ANY);
    printf(
"
binding...
"
);
    
if
(bind(listenfd, (
struct
 sockaddr 
*
)
&
server, 
sizeof
(
struct
 sockaddr)) 
==
 
-
1
) {
        perror(
"
Bind error
"
);
        
ret


Ïà¹ØÎĵµ£º

WindowsÏÂжÔØLinuxϵͳ

   ÎҵĵçÄÔ°²×°ÁË˫ϵͳ£¬WindowsºÍLinux£¬²»¹ýÓÉÓÚLinuxÔÚ×î½üÒ»¶Îʱ¼äÄÚ²»»áʹÓã¬ËùÒÔÎÒ´òËãɾ³ýLinux¡£
   ɾ³ýLinux×îÐèҪעÒâµÄµØ·½£¬¾ÍÊÇMBR£¨Master Boot Record£©¡£ÔÚɾ³ýLinux·ÖÇøÇ°£¬ÎÒÃÇÐèÒª½«Æô¶¯WindowsµÄÒýµ¼ÐÅϢдÈëMBR£¬·ñÔò£¬MBRÖеÄLinuxÒýµ¼ÐÅÏ¢£¬µ±È»¾Í²»ÄÜÆô¶¯WindowsÏµÍ ......

LinuxÈí¼þ¼¯³É¿ª·¢»·¾³


package: download from:
Èí¼þ¼¯³É¿ª·¢»·¾³£¨´úÂë±à¼­¡¢ä¯ÀÀ¡¢±àÒë¡¢µ÷ÊÔ£©
Emacs http://www.gnu.org/software/emacs/
Source-Navigator 5.2b2 http://sourceforge.net/projects/sourcenav
Anjuta http://anjuta.sourceforge.net(¿ÉÓÃyum°²×°)
´úÂëË÷Òý¹¤¾ß
Cscope http://cscope.sourceforge.net/
KScope http:/ ......

matlab for Linux °²×°

×÷Õߣºlch
 
matlab
for
  

Linux
°²×°
(
°²×°·½·¨ÎĵµÊÇ´ÓÍøÉϲé×ÊÁÏ+
ʵ¼ùµÃµ½µÄ )
Ò».
°²×°
1.
Ê×ÏÈÐèÒª½¨Á¢°²×°Ä¿Â¼
[wzh@localhost ~]$ su
[root@localhost ~]$ mkdir /usr/matlab
 
2.
È»ºó¼ÓÔعâÅÌÓ³Ïñ
[root@localhost wzh]# mount -o loop -t iso9660
/mnt/hda7 ......

LINUX SOCKET AIO ÎÊÌâ

дÁË´úÂ룬ʹÓÃace_proactor, Ô­À´windowsÅܵ÷dz£Æ¯ÁÁ£¬À´µ½linux¾Íʱ²»Ê±²»¹¤×÷£¬È»ºó¼Óasynce_connectorºó£¬·¢ÏÖÍê³É²»Äܹ¤×÷£¬async_stream_writeºó£¬·¢ÏÖ¿¨ÔÚÄÇÀ¸ù±¾·¢²»³öÈ¥£¬¶à´Î·ÖÎöºó£¬·¢ÏÖ£¬Ô­À´Ö®Ç°ÓÐaio_readûÓÐÍê³É£¬aio_writeµÄÇëÇó¾ÍblockÄÇÀïÁË£¬writeÕâ¸ö²Ù×÷¾¹È»Ò»¶¨ÒªµÈÇ°µÄaio_readÍê³ÉÖ®ºó£¬²Å¿ÉÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ