프로그램 사용 함수 관련 포스팅 참고 서버 프로그램과 클라이언트 프로그램 만들기 소켓 프로그래밍 TCP/IP 통신 함수 사용하는 순서 Server Client Socket() Bind() Listen() Accept() Send() / Recv() Close() Socket() Connect() Send() / Recv() Close() socket() : 소켓 생성 .. lieadaon.tistory.com #define _WINSOCK_DEPRECATED_NO_WARNINGS #define SERVER_PORT 9001 #define SERVER_IP "목적지IP" #include "MySocketError.h" #pragma comment(lib,"ws2_32") int main(void) { in..
프로그램 사용 함수 관련 포스팅 참고 서버 프로그램과 클라이언트 프로그램 만들기 소켓 프로그래밍 TCP/IP 통신 함수 사용하는 순서 Server Client Socket() Bind() Listen() Accept() Send() / Recv() Close() Socket() Connect() Send() / Recv() Close() socket() : 소켓 생성 .. lieadaon.tistory.com #define _WINSOCK_DEPRECATED_NO_WARNINGS #include "MySocketError.h" #pragma comment(lib, "ws2_32.lib") #define SERVER_IP "외부ip" #define SERVER_PORT 원하는 포트//well-known p..
inet_addr, inet_ntoa #define _WINSOCK_DEPRECATED_NO_WARNINGS 사용하지 않고 함수로 해결하기 클라이언트 inet_addr = inet_pton = inet_pton //문자열을 long type으로 바꾸어 줌 서버 inet_ntoa =inet_ntop =inet_ntop //long type을 문자열로 바꾸어 줌 pton : PC -> 네트워크 ntop : 네트워크 -> PC로 에러코드 해결 C4996 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings Use inet_ntop() o..
TCP/IP P : 프로토콜, 이미 정해져있는 약속 변수 : 저장공간 l-value 상수 : 값, value, constant, 데이터 r-value 아이피 확인 : https://findip.kr/ ip는 시스템 혹은 컴퓨터에 할당되어 있는 번호 port는 프로그램의 번호 메모리 전역변수 - Data 영역 함수선언 만들어진 -code 영역 스택 stack - 작업이 수행되는 곳 - 스레드가 관리함 합 - 보통 new, delete, malloc, realloc, calloc 등의 메모리 함수를 사용해야 건들 수 있음 01. 소켓이란? 02. 소켓과 입출력 03. 통신 프로토콜 04. 클라이언트 서버 모델 소켓 프로그래밍 : 컴퓨터 네트워크를 대상으로 하는 입출력 행위를 다루는 프로그래밍을 네트워크 프로..