먼저 소켓과 동기, 비동기식에 대해서 알아보자
CSocket Class는 동기 소켓이며 함수가 호출 됐을때 그 함수가 끝나기 전 까지 함수를 리턴하지 않고 블럭 상태로 기다린다.
Send를 하면 보내기를 완료 할때까지 다음 단계로 넘어가지 않는다.
때문에 직관적으로 이해하기 쉽고 적은 노력으로 큰 효과를 얻을 수 있다.
//설명 및 파일 첨부 출처 : http://mycpp.blog.me/120099007279
출처입니다 : http://mtjeaids.blog.me/70069847285
파일 입출력을 할 때 주소를 넘길때 사용해봤습니다.
간단하게 사용이 됩니다.
- CString => const char*
CString FileName = _T("file.txt");
const char* Name;
Name = (CStringA)FileName;
- const char* -> CString
const char* Name = "test";
CString FileName;
FileName = (CString)Name;
CStringT type : Declaration
CStringA : An ANSI charcter type string with CRT support.
CStringW : A Unicode charater type string with CRT support.
CString : Both ANSI and Unicode charcter types with CRT support