Skip to content

Commit

Permalink
Merge branch 'test' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
inter0hm authored Nov 20, 2024
2 parents e6eeca5 + f66f6e4 commit d4534e2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Stable/SafeUDP/source/MSafeUDP.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


#include "stdafx.h"
#include "MSafeUDP.h"
#include "MBasePacket.h"
Expand All @@ -12,7 +14,7 @@
#endif


// 에이스사가 컴파일 할 경우에는 이 _OLD_SAFEUDP를 활성화해주세요 - 남기룡(2005/07/26)
// ���̽��簡 ������ �� ��쿡�� �� _OLD_SAFEUDP�� Ȱ��ȭ���ּ��� - �����(2005/07/26)
//#define _OLD_SAFEUDP


Expand Down Expand Up @@ -110,7 +112,7 @@ bool MNetLink::MakeSockAddr(char* pszIP, int nPort, sockaddr_in* pSockAddr)
DWORD dwAddr = inet_addr(pszIP);
if (dwAddr != INADDR_NONE) {
memcpy(&(RemoteAddr.sin_addr), &dwAddr, 4);
} else { // 연결할 host name을 입력한 경우
} else { // ������ host name�� �Է��� ���
HOSTENT* pHost = gethostbyname(pszIP);
if (pHost == NULL) { // error
//#ifdef _DEBUG
Expand All @@ -120,8 +122,8 @@ bool MNetLink::MakeSockAddr(char* pszIP, int nPort, sockaddr_in* pSockAddr)
}
memcpy((char FAR *)&(RemoteAddr.sin_addr), pHost->h_addr, pHost->h_length);
}
// Socket Error가 가끔 난다?
//Gunzd.exe의 0x7c94b21a에 첫째 예외가 있습니다. 0xC0000005: 0xcdcdcddd 위치를 기록하는 동안 액세스 위반이 발생했습니다.
// Socket Error�� ���� ����?
//Gunzd.exe�� 0x7c94b21a�� ù° ���ܰ� �ֽ��ϴ�. 0xC0000005: 0xcdcdcddd ��ġ�� ����ϴ� ���� �׼��� ������ �߻��߽��ϴ�.
memcpy(pSockAddr, &RemoteAddr, sizeof(sockaddr_in));
return true;
}
Expand Down Expand Up @@ -233,7 +235,7 @@ bool MNetLink::SetACKWait(MSafePacket* pPacket, DWORD dwPacketSize)
MACKWaitItem* pACKWaitItem = new MACKWaitItem;
pACKWaitItem->pPacket = pPacket;
pACKWaitItem->dwPacketSize = dwPacketSize;
pACKWaitItem->nSendCount = 1; // SendQueue 에 넣었지만 보냈다고 가정
pACKWaitItem->nSendCount = 1; // SendQueue �� �־����� ���´ٰ� ����
MTime::GetTime(&pACKWaitItem->tvFirstSent);
MTime::GetTime(&pACKWaitItem->tvLastSent);
m_ACKWaitQueue.push_back(pACKWaitItem);
Expand Down Expand Up @@ -617,7 +619,7 @@ bool MSocketThread::FlushSend()
m_SendList.erase(itor);
}
#else
// 건즈에서는 SAFE_UDP_FLAG_SAFE_PACKET를 사용하지 않는다.
// ������� SAFE_UDP_FLAG_SAFE_PACKET�� ������� �ʴ´�.
delete pSendItem->pPacket;
delete pSendItem;
m_SendList.erase(itor);
Expand Down

0 comments on commit d4534e2

Please sign in to comment.