socket
摘要:
1 几个重要的结构 struct sockaddr { unsigned short sa_family; //地址类型,AF_XXX,TCPIP为AF_INET char sa_data[14]; //14字节的协议地址 };struct sockaddr_in{unsigned short sin_famlily;//地址类型unsigned short int sin_port;//端口号struct in_addr sin_addr; //IP地址unsigned sin_zero[8]; // 填充地址,一般赋值为0};struct in_addr;{ Unsigned long s 阅读全文
posted @ 2012-09-03 14:20 好坏 阅读(2054) 评论(0) 推荐(0) 编辑