基础socket编程
摘要:
server 端#define MAXLINE 1024
int main() { int n; char buf[1024]; sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in servaddr; servaddr.sin_family = AF_INET; servaddr.sin_port(6666); servaddr.sin_addr.s_addr = INADDR_ANY; // servaddr.sin_addr.s_addr=inet_addr("127.0.0.1"); // inet 阅读全文
posted @ 2012-06-18 22:02 java课程设计 阅读(225) 评论(0) 推荐(0) 编辑