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

c±à³Ì ͨѶЭÒéhttp

Îʸö±È½ÏÈõµÄÎÊÌâ¡£
ÓÃc¿ª·¢£¬·þÎñÆ÷ºÍ¿Í»§¶ËµÄ³ÌÐò£¬Í¨Ñ¶Ð­ÒéÓÃhttp¡£
²»ÖªµÀÔõôÈëÊÖÁË£¬ÊDz»ÊÇsocket±à³Ì£¿»¹ÊÇÓ¦¸Ã¿´ÄÄЩ·½ÃæµÄ¼¼Êõ
ÓÐÏֳɵÄhttp¿â  ÄÃÀ´ÓÃ
×Ô¼ºÐ´socketÂé·³ËÀÁË

ÍøÉÏÕÒµã´úÂ룡  ×Ô¼ºÐ´ÄÜ·³ËÀ£¡

ÒýÓÃ
ÓÐÏֳɵÄhttp¿â  ÄÃÀ´ÓÃ
×Ô¼ºÐ´socketÂé·³ËÀÁË

ллÁË
ÏÖÔÚÓÐÄÄЩhttp¿â£¬±È½Ï³£Óõģ¿

¶¥Ò»Ï£¡

C/C++ code:

#include<iostream>
#include<map>
#include<stdlib.h>
#include<signal.h>
#include<errno.h>
#include<unistd.h>
#include<string.h>
#include<sys/resource.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<fcntl.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<sys/socket.h>

#define PORT 80
#define BUFSIZE 8196
#define LISTENQ 64 //

using namespace std;

struct client_t{
int fd;
int state;
unsigned int pois;
string ip;
string read_buf;
string write_buf;

//http request
string method_req;
string url;
string http_v;
string host;
client_t(){
fd=0;
state=0;//¶Áд״̬£¬0-¶Á£¬1-д
pois=0;
ip.clear();
read_buf.reserve(BUFSIZE);
write_buf.reserve(BUFSIZE);
method_req.clear();


Ïà¹ØÎÊ´ð£º

Ò»¸ö¼òµ¥µÄcÓÎÏ·

13¸öÈËΧ³ÉһȦ£¬´ÓµÚÒ»¸öÈË¿ªÊ¼Ë³Ðò±¨ºÅ1£¬2£¬3¡£·²±¨µ½3ÕßÍ˳öȦ×Ó£¬ÕÒ³ö×îºóÁôÔÚȦ×ÓÖеÄÈËÔ­À´µÄÐòºÅ
½á¹ûÓ¦¸ÃÊÇ13 ¿ÉÎҵijÌÐòµÄ½á¹ûÊÇ11 Ï£ÍûºÃÐÄÈ˰ï¸ÄÒ»ÏÂ
#include <stdio.h>
#include < ......

CÖеÄÎÊÌâ

#include <iostream.h>
void main(){
int x,y,t=0,b=0;
x=y=0;t=x++&&++y;

cout < <"t=" < <t < <"," < <"x=" < <x &l ......

ÄÜÓÃC/C++¼òµ¥ÊµÏÖÎå×ÓÆå³ÌÐòÂð?

×î½üͻȻÏë×Ô¼ºÀ´ÊµÏÖÒ»¸öÎå×ÓÆå³ÌÐò,µ«²»ÖªµÀÔõô¿ªÊ¼,×Ô¼ºÒ²Ã»Ñ§»­Í¼Ðκ¯Êý,ÄÜÔÚ¿ØÖÆÌ¨ÏÂÖ±½ÓдÂð>>>?????
¿ØÖÆÌ¨£¿±ÈͼÐνçÃæ¸üÂé·³¡£
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......

c/sÏîÄ¿ÖÐÀûÓÃÏß³ÌÈçºÎÅжϿͻ§¶ËµÄµÚÒ»´ÎÇëÇó£¿

ÔÚÏß³ÌÀàÀïÃæ£¬±êʶһÏÂÊÇ·ñÊǵÚÒ»´ÎÇëÇó£¿
ÎÒÒÔǰÓöµ½¹ýÀàËÆµÄÎÊÌ⣬µ±Ê±Êǵã»÷Ñ¡Ïµ¯³öÒ»¸öд°¿Ú£¨ÀàËÆ360£©£¬ÎªÁ˲»²úÉúÖØ¸´µÄ´°¿Ú£¬¼ÓÒ»¸öbooleanÐÍEXIST±äÁ¿£¬±êʾ´°¿ÚÊÇ·ñÒѾ­²úÉú£¬Äã¿ÉÒÔͬÑù¼ÓÒ»¸öÀàËÆµ ......

CΪʲôûÓб»C++´úÌæ

CΪʲôûÓб»C++´úÌæ,CÄÜ×öµÄC++¶¼ÄÜ×ö°É£¿C++ÄÜ×öµÄC²»Ò»¶¨ÄÜÄÜ×ö°É£¿ÄÇΪʲôC»¹Ã»Óб»ÌÔÌ­ÄØ£¿
×îÊÊÓõÄÁìÓò²»Í¬ËùÒÔÄÜÕ¾µÃסßÂ~~~

Â¥Ö÷˵´íÁË£¬C++ÄÜ×öµÄCÈ«ÄÜ×ö£¬ÒòΪC++Ò²ÊÇCʵÏֵġ£

ÓÐÐí¶àµØ·½Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ