mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-11 11:19:09 +00:00
1
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef NET_VIEW_THREAD_H
|
||||
#define NET_VIEW_THREAD_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "utlvector.h"
|
||||
|
||||
|
||||
class CNetViewThread
|
||||
{
|
||||
public:
|
||||
CNetViewThread();
|
||||
~CNetViewThread();
|
||||
|
||||
// This creates the thread that periodically checks "net view" to get the current list of
|
||||
// machines out on the network.
|
||||
void Init();
|
||||
void Term();
|
||||
|
||||
void GetComputerNames( CUtlVector<char*> &computerNames );
|
||||
|
||||
private:
|
||||
|
||||
void UpdateServicesFromNetView();
|
||||
void ParseComputerNames( const char *pNetViewOutput );
|
||||
|
||||
DWORD ThreadFn();
|
||||
static DWORD WINAPI StaticThreadFn( LPVOID lpParameter );
|
||||
|
||||
CUtlVector<char*> m_ComputerNames;
|
||||
HANDLE m_hThread;
|
||||
HANDLE m_hThreadExitEvent;
|
||||
CRITICAL_SECTION m_ComputerNamesCS;
|
||||
};
|
||||
|
||||
|
||||
#endif // NET_VIEW_THREAD_H
|
||||
Reference in New Issue
Block a user