摘要: 服务器:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <unistd.h>#include <netdb.h>#include "DieWithMessage.h"#define BUFSIZE 512static const int MAXPENDING = 5;int SetupTCPServerSocket(con 阅读全文
posted @ 2012-11-14 23:18 wouldguan 阅读(3439) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#include <netdb.h>#include "DieWithMessage.h"void PrintSocketAddress(const struct sockaddr *address, FILE *stream);int main(int argc, char *argv[]){ if(argc != 3) DieWithUserMessage("Parameter(s)", &q 阅读全文
posted @ 2012-11-14 21:41 wouldguan 阅读(635) 评论(0) 推荐(0) 编辑