转自:http://www.blogjava.net/woxingwosu/archive/2007/12/17/168179.html
#include <sys/stat.h> #include <sys/types.h> #include <sys/socket.h> #include <stdio.h> #include <malloc.h> #include <netdb.h> #include <fcntl.h>#include <unistd.h>#include <netinet/in.h>#include <arpa/inet.h>
#define RES_LENGTH 10240 //接受字符的最大长度
int connect_socket(char * server,int serverPort);int send_m......
阅读全文