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

c/c++ʵÏÖÒ»¸öÃܼ¯ÐÍserver/socket¶à·¸´ÓÃselect


×÷Ò»¸ötcpµÄ·þÎñ³ÌÐò£¬Í¬Ê±¿ÉÄÜÓдóÁ¿µÄ¿Í»§¶ËÁ¬ÉÏÀ´£¬Ï£Íû·Ö±ð¼Çס¸÷¸ösocket
Ë­ÓÐÊý¾Ý¹ýÀ´£¬¾Í¶Á³öÀ´£¬·Åµ½Ò»¸öÇëÇó¶ÓÁУ­£­ÕâЩÊÂÇéÓÃÒ»¸öÏß³ÌÍê³É
 
ÁíÍâÓÐÒ»¸ö½á¹û¶ÓÁУ¬Èç¹û½á¹ûÀï°üº¬ÁËsocketµÄ±àºÅ£¬ÓÃÒ»¸öÏß³ÌרÃÅ£º
È¡³öÀ´°´±àºÅÕÒ»ØÔ­À´·¢ËÍÕßsocket£¬·¢»Ø¸øÔ­À´µÄ¿Í»§¶Ë
 
»¹ÓÐÒ»¸ö¾ÍÊÇ´¦ÀíỊ̈߳¨³Ø£©£¬ËüÈ¡³öÇëÇó¶ÓÁÐÀïµÄÒ»¸öÇëÇ󣬽øÐд¦Àí£¬
°Ñ´¦Àí½á¹û·ÅÈë½á¹û¶ÓÁÐ
 
²»ÖªµÀÓÐûÓÐÏֳɵĿò¼Ü£¿
ÍøÉÏÖ»ÕÒµ½Ò»Ð©ºÜ¡£¡£¡£µÄ£º
http://fanqiang.chinaunix.net/a4/b7/20010508/112359.html
LinuxÍøÂç±à³Ì--9. ·þÎñÆ÷Ä£ÐÍ
http://linuxc.51.net ×÷Õß:hoyt (2001-05-08 11:23:59)
 
    ѧϰ¹ý¡¶Èí¼þ¹¤³Ì¡·°É.Èí¼þ¹¤³Ì¿ÉÊÇÿһ¸ö³ÌÐòÔ±"±ØÐÞ"µÄ¿Î³Ì°¡.Èç¹ûÄãûÓÐѧϰ¹ý, ½¨ÒéÄãÈ¥¿´Ò»¿´. ÔÚÕâÒ»ÕÂÀïÃæ,ÎÒÃÇÒ»ÆðÀ´´ÓÈí¼þ¹¤³ÌµÄ½Ç¶ÈѧϰÍøÂç±à³ÌµÄ˼Ïë.ÔÚÎÒÃÇд³ÌÐò֮ǰ, ÎÒÃǶ¼Ó¦¸Ã´ÓÈí¼þ¹¤³ÌµÄ½Ç¶È¹æ»®ºÃÎÒÃǵÄÈí¼þ,ÕâÑùÎÒÃÇ¿ª·¢Èí¼þµÄЧÂʲŻá¸ß. ÔÚÍøÂç³ÌÐòÀïÃæ,Ò»°ãµÄÀ´Ëµ¶¼ÊÇÐí¶à¿Í»§»ú¶ÔÓ¦Ò»¸ö·þÎñÆ÷.ΪÁË´¦Àí¿Í»§»úµÄÇëÇó, ¶Ô·þÎñ¶ËµÄ³ÌÐò¾ÍÌá³öÁËÌØÊâµÄÒªÇó.ÎÒÃÇѧϰһÏÂÄ¿Ç°×î³£ÓõķþÎñÆ÷Ä£ÐÍ. 
 
Ñ­»··þÎñÆ÷:Ñ­»··þÎñÆ÷ÔÚͬһ¸öʱ¿ÌÖ»¿ÉÒÔÏìÓ¦Ò»¸ö¿Í»§¶ËµÄÇëÇó 
 
²¢·¢·þÎñÆ÷:²¢·¢·þÎñÆ÷ÔÚͬһ¸öʱ¿Ì¿ÉÒÔÏìÓ¦¶à¸ö¿Í»§¶ËµÄÇëÇó 
 
 
9.1 Ñ­»··þÎñÆ÷:UDP·þÎñÆ÷ 
UDPÑ­»··þÎñÆ÷µÄʵÏַdz£¼òµ¥:UDP·þÎñÆ÷ÿ´Î´ÓÌ×½Ó×ÖÉ϶ÁÈ¡Ò»¸ö¿Í»§¶ËµÄÇëÇó,´¦Àí, È»ºó½«½á¹û·µ»Ø¸ø¿Í»§»ú. 
 
¿ÉÒÔÓÃÏÂÃæµÄËã·¨À´ÊµÏÖ. 
 
   socket(...);
   bind(...);
   while(1)
    {
         recvfrom(...);
         process(...);
         sendto(...);
   }
 
ÒòΪUDPÊÇ·ÇÃæÏòÁ¬½ÓµÄ,ûÓÐÒ»¸ö¿Í»§¶Ë¿ÉÒÔÀÏÊÇռס·þÎñ¶Ë. Ö»Òª´¦Àí¹ý³Ì²»ÊÇËÀÑ­»·, ·þÎñÆ÷¶ÔÓÚÿһ¸ö¿Í»§»úµÄÇëÇó×ÜÊÇÄܹ»Âú×ã. 
9.2 Ñ­»··þÎñÆ÷:TCP·þÎñÆ÷ 
TCPÑ­»··þÎñÆ÷µÄʵÏÖÒ²²»ÄÑ:TCP·þÎñÆ÷½ÓÊÜÒ»¸ö¿Í»§¶ËµÄÁ¬½Ó,È»ºó´¦Àí,Íê³ÉÁËÕâ¸ö¿Í»§µÄËùÓÐÇëÇóºó,¶Ï¿ªÁ¬½Ó. 
 
Ëã·¨ÈçÏÂ: 
 
   &nb


Ïà¹ØÎĵµ£º

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
         &n ......

flashpolicyd c °æ±¾

#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <getopt.h>
#define MAX_READFILE 24
#define MAX_INPUTFILE 10240
char *file ;
void time_out(){
syslog(LOG_INFO,"read inp ......

C±à³ÌʵÏÖhttpЭÒé


´ó¼Ò¶¼ºÜÊìϤHTTPЭÒéµÄÓ¦Óã¬ÒòΪÿÌ춼ÔÚÍøÂçÉÏä¯ÀÀ×Ų»ÉÙ¶«Î÷£¬Ò²¶¼ÖªµÀÊÇHTTPЭÒéÊÇÏ൱¼òµ¥µÄ¡£Ã¿´ÎÓÃthunderÖ®ÀàµÄÏÂÔØÈí¼þÏÂÔØÍøÒ³£¬µ±Óõ½ÄǸö“ÓÃthunderÏÂÔØÈ«²¿Á´½Ó”ʱ×ܾõµÃºÜÉñÆæ¡£
ºóÀ´ÏëÏ룬ÆäʵҪʵÏÖÕâЩÏÂÔع¦ÄÜÒ²²¢²»ÄÑ£¬Ö»Òª°´ÕÕHTTPЭÒé·¢ËÍrequest£¬È»ºó¶Ô½ÓÊÕµ½µÄÊý¾Ý½øÐзÖÎö£¬Èç¹ûÒ ......

Ïê½âCÅÌWindowsÎļþ¼ÐÀïÖØÒªÎļþµÄ×÷ÓÃ

Ïê½âCÅÌWindowsÎļþ¼ÐÀïÖØÒªÎļþµÄ×÷Óà
ÔÚÕû¸öWindows²Ù×÷ϵͳÖУ¬×îÖØÒªµÄĪ¹ýÓÚ“Windows”Îļþ¼Ð£¬¶ÔµçÄÔ½øÐÐÈκβÙ×÷¼¸ºõ¶¼Óйء£Á˽âÕâÀï¶ÔÓÚÕÆÎÕÕû¸öϵͳµÄÔË×÷ÓкܴóµÄ×÷Óã¬Èç¹ûÓÐÐËȤ²»·ÁÍùÏ¿´¿´¡£
Ò»¡¢Ó¡ÏóÖеÄWindowsÎļþ¼Ð
“Windows”Îļþ¼Ð¸øÈ˵ĵÚÒ»Ó¡Ïó¾ÍÊÇ´ó¶øÂÒ£¬¸Ð¾õÀïÃæ ......

ÓÃC/gsoapʵÏÖWebService

תÌù×Ô£ºhttp://blog.sina.com.cn/s/blog_629562fe0100gs2l.html
ÉÔ×÷ÐÞ¸Ä
 
gSOAPÊÇÒ»¸ö¿äƽ̨µÄ£¬ÓÃÓÚ¿ª·¢Web Service·þÎñ¶ËºÍ¿Í»§¶ËµÄ¹¤¾ß£¬ÔÚWindows¡¢Linux¡¢MAC OSºÍUNIXÏÂʹÓÃCºÍC++ÓïÑÔ±àÂ룬¼¯³ÉÁËSSL¹¦ÄÜ¡£
ÏÂÔصØÖ·£ºhttp://sourceforge.net/projects/gsoap2
¹Ù·½ÍøÕ¾£ºhttp://genivia.com/Products/g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ