全部博文(252)
分类: LINUX
2011-11-09 09:40:17
@sky2011-11-10 09:45:54
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <zlib.h>
#define err(msg) perror(msg)
#define SA struct sockaddr
static int tcp_net_listen(char *ip, int port)
{
struct sockaddr_in addr;
&nb
@sky2011-11-09 10:19:06
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <zlib.h>
#define err(msg) perror(msg)
#define SA struct sockaddr
static int tcp_net_listen(char *ip, int port)
{
struct sockaddr_in addr;
&nb