UDP daytime 에코서버 프로그래밍! #include #include #include #include #include #pragma comment(lib,"ws2_32.lib") #define BUFSIZE 30 void ErrorHandling(char *message); int main(int argc, char **argv){ WSADATA wsaData; SOCKET hServSock; char message[BUFSIZE]; int strLen,num=0; time_t timer; struct tm *t; SOCKADDR_IN servAddr; SOCKADDR_IN clntAddr; int clntAddrSize; if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0) ErrorHandling("WSAStartu.. 더보기 TCP/IP echo_client programming! #include #include #include #include #pragma comment(lib,"ws2_32.lib") #define BUFSIZE 1024 void ErrorHandling(char *message); int main(int argc, char **argv) { WSADATA wsaData; SOCKET hSocket; char message[BUFSIZE]; int strLen; SOCKADDR_IN servAddr; if(argc!=3){ printf("Usage : %s \n", argv[0]); exit(1); } if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0) ErrorHandling("WSAStartup() error!"); hSocket=so.. 더보기 이전 1 ··· 28 29 30 31 32 33 34 ··· 40 다음