UDP 경계 에코 서버 구축하기 #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; SOCKADDR_IN servAddr; SOCKADDR_IN clntAddr; int clntAddrSize; if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0) ErrorHandling("WSAStartup() error!"); hServSock=socket(PF_IN.. 더보기 UDP 에코 클라이언트 구축하기 #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 hSocket; char message[30]; int strLen; SOCKADDR_IN servAddr; if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0) ErrorHandling("WSAStartup() error!"); //타입 hSocket=socket(PF_INET,SOCK_DGRAM, 0); if(hSocket == INVALID_SOCKET) E.. 더보기 이전 1 ··· 26 27 28 29 30 31 32 ··· 40 다음