-
Notifications
You must be signed in to change notification settings - Fork 270
/
Copy pathFindSteamServers.h
94 lines (75 loc) · 2.2 KB
/
FindSteamServers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the agreement/contract under which the contents have been supplied.
//
//*****************************************************************************
//
// Contents:
//
//
//
// Authors: Taylor Sherman
//
// Target restrictions:
//
// Tool restrictions:
//
// Things to do:
//
//
//
//*****************************************************************************
#ifndef INCLUDED_STEAM_FINDSTEAMSERVERS_H
#define INCLUDED_STEAM_FINDSTEAMSERVERS_H
#if defined(_MSC_VER) && (_MSC_VER > 1000)
#pragma once
#endif
#ifdef STEAM_FINDSERVERS_STATIC_LIB
#define STEAM_FSS_CALL
#define STEAM_FSS_API
#else
#ifndef STEAM_API
#ifdef STEAM_EXPORTS
#define STEAM_API __declspec(dllexport)
#else
#define STEAM_API __declspec(dllimport)
#endif
#endif
#ifndef STEAM_CALL
#define STEAM_CALL __cdecl
#endif
#define STEAM_FSS_CALL STEAM_CALL
#define STEAM_FSS_API STEAM_API
#endif
#include <limits.h>
#include "steamcommon.h"
/******************************************************************************
**
** Types
**
******************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
enum
{
eSteamFindSteamServersLibraryError = -1,
eSteamFindSteamServersLibraryBusy = -2
};
// returns number of IP addresses returned by the GDS for this server type
// negative return means error
STEAM_FSS_API int STEAM_FSS_CALL SteamFindServersNumServers(ESteamServerType eServerType);
// Get nth ipaddr:port for this server type
// buffer needs to be 22 chars long: aaa.bbb.ccc.ddd:12345 plus null
//
// returns 0 if succsessful, negative is error
STEAM_FSS_API int STEAM_FSS_CALL SteamFindServersIterateServer(ESteamServerType eServerType, unsigned int nServer, char *szIpAddrPort, int szIpAddrPortLen);
STEAM_FSS_API const char * STEAM_FSS_CALL SteamFindServersGetErrorString();
#ifdef __cplusplus
}
#endif
#endif /* #ifndef INCLUDED_STEAM_COMMON_STEAMCOMMON_H */