易截截图软件、单文件、免安装、纯绿色、仅160KB

c编程 通讯协议http

问个比较弱的问题。
用c开发,服务器和客户端的程序,通讯协议用http。
不知道怎么入手了,是不是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基础

#include <string.h>
#include <stdio.h>

void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......

一个简单的c游戏

13个人围成一圈,从第一个人开始顺序报号1,2,3。凡报到3者退出圈子,找出最后留在圈子中的人原来的序号
结果应该是13 可我的程序的结果是11 希望好心人帮改一下
#include <stdio.h>
#include < ......

为什么C写DLL文件C、PB能调用VB不能调用

为什么C写的DLL文件C、PB能调用VB不能调用?
VB里为什么有的DLL直接通过引用可以使用?有的需要通过declare申明外部函数?这些DLL有什么差别?

1、为什么PB能通过DECLARE声明而VB不行?
2、如果这个dll中的 ......

菜鸟求解:c图形问题

#include <stdio.h>
#include <graphics.h>
void main()
{
  int x0,y0,x1,y1,driver,mode,i;
  driver=VGA;
  mode=VGAHI;
  initgraph(&driver,&mode,&qu ......

关于the c program 的一道题!

编写程序detab, 将输入中的制表符替换成适当数目的空格,使空格充满到下一个制表符终止的地方。假设制表符终止位的位置是固定的,比如每隔n列就会出现一个制表符终止位。
------------------- ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号