이전 판 책에 추가 PDF로 내보내기 책 생성기 내 책으로 이 페이지 추가 책 생성기 내 책에서 이 페이지 제거 책 관리 (0 페이지) 도움말 문서의 이전 판입니다! Communication API > BS2_GetSocketRetryCount BS2_GetSocketRetryCount [+ 2.8.4] 일반 TCP/IP 소켓 통신 시, 통신구간에서 소켓으로부터 패킷을 읽고쓰는 도중 오류가 발생하게되면, SDK는 자동으로 일정 횟수 만큼 재시도를 하는데, 이 함수는 SDK에 설정된 재시도 횟수 설정 값을 가져옵니다. 함수 #include "BS_API.h" int BS2_GetSocketRetryCount(void* context, uint32_t* count); 파라미터 [In] context : Context [Out] count : 재시도 횟수 설정 값 포인터 반환값 성공적으로 수행될 경우 BS_SDK_SUCCESS를 반환하고, 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. 함께 보기 BS2_SetSocketRetryCount 샘플코드(C++) sample_setdebugfilelogex.cpp const char* CURRENT_DIR = "."; const int MAX_SIZE_LOG_FILE = 100; // 100MB int sdkResult = BS2_SetDebugFileLogEx(DEBUG_LOG_ALL, DEBUG_MODULE_ALL, CURRENT_DIR, MAX_SIZE_LOG_FILE); if (BS_SDK_SUCCESS != sdkResult) { printf("BS2_SetDebugFileLogEx call failed: %d", sdkResult); return; } 샘플코드(C#) sample_setdebugfilelogex.cs const string CURRENT_DIR = "."; const int MAX_SIZE_LOG_FILE = 100; // 100MB IntPtr ptrDir = Marshal.StringToHGlobalAnsi(CURRENT_DIR); result = (BS2ErrorCode)API.BS2_SetDebugFileLogEx(Constants.DEBUG_LOG_OPERATION_ALL, Constants.DEBUG_MODULE_ALL, ptrDir, MAX_SIZE_LOG_FILE); Marshal.FreeHGlobal(ptrDir); if (result != BS2ErrorCode.BS_SDK_SUCCESS) { Console.WriteLine("Got error({0}).", result); return; }