bool TcpNetwork::RunProcessReceive(const int sessionIndex, const SOCKET fd, fd_set & read_set) { if (!FD_ISSET(fd, &read_set)) return true; //소켓에 들어온 데이터를 저장. auto ret = RecvSocket(sessionIndex); if (ret != NET_ERROR_CODE::NONE) { CloseSession(ServerConfig::SOCKET_CLOSE_CASE::SOCKET_RECV_ERROR, fd, sessionIndex); return false; } //패킷단위로 데이터를 읽음.???? ret = RecvBufferProcess(sessionIndex); if (ret != NET_ERROR_CODE::NONE) { CloseSession(ServerConfig::SOCKET_CLOSE_CASE::SOCKET_RECV_ERROR, fd, sessionIndex); return false; } return true; }
bool TcpNetwork::RunProcessReceive(const int sessionIndex, const SOCKET fd, fd_set& read_set) { if (!FD_ISSET(fd, &read_set)) { return true; } auto ret = RecvSocket(sessionIndex); if (ret != NETWORK_ERROR_CODE::NONE) { CloseSession(SOCKET_CLOSE_CASE::SOCKET_RECV_ERROR, fd, sessionIndex); return false; } ret = RecvBufferProcess(sessionIndex); if (ret != NETWORK_ERROR_CODE::NONE) { CloseSession(SOCKET_CLOSE_CASE::SOCKET_RECV_BUFFER_PROCESS_ERROR, fd, sessionIndex); return false; } return true; }