Ejemplo n.º 1
0
void LogOnConnect(CONNID dwConnID, const CString& strAddress, USHORT usPort)
{
	LPTSTR lpszContent = new TCHAR[100];
	wsprintf(lpszContent, _T("local address: %s:%d"), strAddress, usPort);
	int content_len = lstrlen(lpszContent);
	info_msg* msg = info_msg::Construct(dwConnID, EVT_ON_CONNECT, content_len, lpszContent);

	LogInfoMsg(msg);
}
Ejemplo n.º 2
0
void PostOnPrepareListen(LPCTSTR lpszAddress, USHORT usPort)
{
	LPTSTR lpszContent = new TCHAR[100];
	wsprintf(lpszContent, _T("bind address: %s:%d"), lpszAddress, usPort);
	int content_len = lstrlen(lpszContent);
	info_msg* msg = info_msg::Construct(0, EVT_ON_PREPARE_LISTEN, content_len, lpszContent);

	LogInfoMsg(msg);
}
Ejemplo n.º 3
0
void PostOnPrepareConnect(CONNID dwConnID)
{
	info_msg* msg = info_msg::Construct(dwConnID, EVT_ON_PREPARE_CONNECT, 0, nullptr);

	LogInfoMsg(msg);
}
Ejemplo n.º 4
0
void LogOnClose(CONNID dwConnID, LPCTSTR lpszName)
{
	info_msg* msg = info_msg::Construct(dwConnID, EVT_ON_CLOSE, 0, nullptr, lpszName);

	LogInfoMsg(msg);
}