C# 클래스 Steamworks.SteamMatchmakingServers

파일 보기 프로젝트 열기: rlabrecque/Steamworks.NET

공개 메소드들

메소드 설명
CancelQuery ( HServerListRequest hRequest ) : void

Cancel an request which is operation on the given list type. You should call this to cancel

any in-progress requests before destructing a callback object that may have been passed

to one of the above list request calls. Not doing so may result in a crash when a callback

occurs on the destructed object.

Canceling a query does not release the allocated request handle.

The request handle must be released using ReleaseRequest( hRequest )

CancelServerQuery ( HServerQuery hServerQuery ) : void

Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel

any in-progress requests before destructing a callback object that may have been passed

to one of the above calls to avoid crashing when callbacks occur.

GetServerCount ( HServerListRequest hRequest ) : int

How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1

GetServerDetails ( HServerListRequest hRequest, int iServer ) : Steamworks.gameserveritem_t

the filter operation codes that go in the key part of MatchMakingKeyValuePair_t should be one of these:

"map"

- Server passes the filter if the server is playing the specified map.

"gamedataand"

- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains all of the

specified strings. The value field is a comma-delimited list of strings to match.

"gamedataor"

- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains at least one of the

specified strings. The value field is a comma-delimited list of strings to match.

"gamedatanor"

- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) does not contain any

of the specified strings. The value field is a comma-delimited list of strings to check.

"gametagsand"

- Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) contains all

of the specified strings. The value field is a comma-delimited list of strings to check.

"gametagsnor"

- Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) does not contain any

of the specified strings. The value field is a comma-delimited list of strings to check.

"and" (x1 && x2 && ... && xn)

"or" (x1 || x2 || ... || xn)

"nand" !(x1 && x2 && ... && xn)

"nor" !(x1 || x2 || ... || xn)

- Performs Boolean operation on the following filters. The operand to this filter specifies

the "size" of the Boolean inputs to the operation, in Key/value pairs. (The keyvalue

pairs must immediately follow, i.e. this is a prefix logical operator notation.)

In the simplest case where Boolean expressions are not nested, this is simply

the number of operands.

For example, to match servers on a particular map or with a particular tag, would would

use these filters.

( server.map == "cp_dustbowl" || server.gametags.contains("payload") )

"or", "2"

"map", "cp_dustbowl"

"gametagsand", "payload"

If logical inputs are nested, then the operand specifies the size of the entire

"length" of its operands, not the number of immediate children.

( server.map == "cp_dustbowl" || ( server.gametags.contains("payload") && !server.gametags.contains("payloadrace") ) )

"or", "4"

"map", "cp_dustbowl"

"and", "2"

"gametagsand", "payload"

"gametagsnor", "payloadrace"

Unary NOT can be achieved using either "nand" or "nor" with a single operand.

"addr"

- Server passes the filter if the server's query address matches the specified IP or IP:port.

"gameaddr"

- Server passes the filter if the server's game address matches the specified IP or IP:port.

The following filter operations ignore the "value" part of MatchMakingKeyValuePair_t

"dedicated"

- Server passes the filter if it passed true to SetDedicatedServer.

"secure"

- Server passes the filter if the server is VAC-enabled.

"notfull"

- Server passes the filter if the player count is less than the reported max player count.

"hasplayers"

- Server passes the filter if the player count is greater than zero.

"noplayers"

- Server passes the filter if it doesn't have any players.

"linux"

- Server passes the filter if it's a linux server

Get details on a given server in the list, you can get the valid range of index

values by calling GetServerCount(). You will also receive index values in

ISteamMatchmakingServerListResponse::ServerResponded() callbacks

IsRefreshing ( HServerListRequest hRequest ) : bool

Returns true if the list is currently refreshing its server list

PingServer ( uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse ) : HServerQuery

-----------------------------------------------------------------------------

Queries to individual servers directly via IP/Port

-----------------------------------------------------------------------------

Request updated ping time and other details from a single server

PlayerDetails ( uint unIP, ushort usPort, ISteamMatchmakingPlayersResponse pRequestServersResponse ) : HServerQuery

Request the list of players currently playing on a server

RefreshQuery ( HServerListRequest hRequest ) : void

Ping every server in your list again but don't update the list of servers

Query callback installed when the server list was requested will be used

again to post notifications and RefreshComplete, so the callback must remain

valid until another RefreshComplete is called on it or the request

is released with ReleaseRequest( hRequest )

RefreshServer ( HServerListRequest hRequest, int iServer ) : void

Refresh a single server inside of a query (rather than all the servers )

ReleaseRequest ( HServerListRequest hServerListRequest ) : void

Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress.

RefreshComplete callback is not posted when request is released.

RequestFavoritesServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
RequestFriendsServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
RequestHistoryServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
RequestInternetServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest

Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values.

Each call allocates a new asynchronous request object.

Request object must be released by calling ReleaseRequest( hServerListRequest )

RequestLANServerList ( AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
RequestSpectatorServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
ServerRules ( uint unIP, ushort usPort, ISteamMatchmakingRulesResponse pRequestServersResponse ) : HServerQuery

Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side)

메소드 상세

CancelQuery() 공개 정적인 메소드

Cancel an request which is operation on the given list type. You should call this to cancel

any in-progress requests before destructing a callback object that may have been passed

to one of the above list request calls. Not doing so may result in a crash when a callback

occurs on the destructed object.

Canceling a query does not release the allocated request handle.

The request handle must be released using ReleaseRequest( hRequest )

public static CancelQuery ( HServerListRequest hRequest ) : void
hRequest HServerListRequest
리턴 void

CancelServerQuery() 공개 정적인 메소드

Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel

any in-progress requests before destructing a callback object that may have been passed

to one of the above calls to avoid crashing when callbacks occur.

public static CancelServerQuery ( HServerQuery hServerQuery ) : void
hServerQuery HServerQuery
리턴 void

GetServerCount() 공개 정적인 메소드

How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1

public static GetServerCount ( HServerListRequest hRequest ) : int
hRequest HServerListRequest
리턴 int

GetServerDetails() 공개 정적인 메소드

the filter operation codes that go in the key part of MatchMakingKeyValuePair_t should be one of these:

"map"

- Server passes the filter if the server is playing the specified map.

"gamedataand"

- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains all of the

specified strings. The value field is a comma-delimited list of strings to match.

"gamedataor"

- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains at least one of the

specified strings. The value field is a comma-delimited list of strings to match.

"gamedatanor"

- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) does not contain any

of the specified strings. The value field is a comma-delimited list of strings to check.

"gametagsand"

- Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) contains all

of the specified strings. The value field is a comma-delimited list of strings to check.

"gametagsnor"

- Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) does not contain any

of the specified strings. The value field is a comma-delimited list of strings to check.

"and" (x1 && x2 && ... && xn)

"or" (x1 || x2 || ... || xn)

"nand" !(x1 && x2 && ... && xn)

"nor" !(x1 || x2 || ... || xn)

- Performs Boolean operation on the following filters. The operand to this filter specifies

the "size" of the Boolean inputs to the operation, in Key/value pairs. (The keyvalue

pairs must immediately follow, i.e. this is a prefix logical operator notation.)

In the simplest case where Boolean expressions are not nested, this is simply

the number of operands.

For example, to match servers on a particular map or with a particular tag, would would

use these filters.

( server.map == "cp_dustbowl" || server.gametags.contains("payload") )

"or", "2"

"map", "cp_dustbowl"

"gametagsand", "payload"

If logical inputs are nested, then the operand specifies the size of the entire

"length" of its operands, not the number of immediate children.

( server.map == "cp_dustbowl" || ( server.gametags.contains("payload") && !server.gametags.contains("payloadrace") ) )

"or", "4"

"map", "cp_dustbowl"

"and", "2"

"gametagsand", "payload"

"gametagsnor", "payloadrace"

Unary NOT can be achieved using either "nand" or "nor" with a single operand.

"addr"

- Server passes the filter if the server's query address matches the specified IP or IP:port.

"gameaddr"

- Server passes the filter if the server's game address matches the specified IP or IP:port.

The following filter operations ignore the "value" part of MatchMakingKeyValuePair_t

"dedicated"

- Server passes the filter if it passed true to SetDedicatedServer.

"secure"

- Server passes the filter if the server is VAC-enabled.

"notfull"

- Server passes the filter if the player count is less than the reported max player count.

"hasplayers"

- Server passes the filter if the player count is greater than zero.

"noplayers"

- Server passes the filter if it doesn't have any players.

"linux"

- Server passes the filter if it's a linux server

Get details on a given server in the list, you can get the valid range of index

values by calling GetServerCount(). You will also receive index values in

ISteamMatchmakingServerListResponse::ServerResponded() callbacks

public static GetServerDetails ( HServerListRequest hRequest, int iServer ) : Steamworks.gameserveritem_t
hRequest HServerListRequest
iServer int
리턴 Steamworks.gameserveritem_t

IsRefreshing() 공개 정적인 메소드

Returns true if the list is currently refreshing its server list

public static IsRefreshing ( HServerListRequest hRequest ) : bool
hRequest HServerListRequest
리턴 bool

PingServer() 공개 정적인 메소드

-----------------------------------------------------------------------------

Queries to individual servers directly via IP/Port

-----------------------------------------------------------------------------

Request updated ping time and other details from a single server

public static PingServer ( uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse ) : HServerQuery
unIP uint
usPort ushort
pRequestServersResponse ISteamMatchmakingPingResponse
리턴 HServerQuery

PlayerDetails() 공개 정적인 메소드

Request the list of players currently playing on a server

public static PlayerDetails ( uint unIP, ushort usPort, ISteamMatchmakingPlayersResponse pRequestServersResponse ) : HServerQuery
unIP uint
usPort ushort
pRequestServersResponse ISteamMatchmakingPlayersResponse
리턴 HServerQuery

RefreshQuery() 공개 정적인 메소드

Ping every server in your list again but don't update the list of servers

Query callback installed when the server list was requested will be used

again to post notifications and RefreshComplete, so the callback must remain

valid until another RefreshComplete is called on it or the request

is released with ReleaseRequest( hRequest )

public static RefreshQuery ( HServerListRequest hRequest ) : void
hRequest HServerListRequest
리턴 void

RefreshServer() 공개 정적인 메소드

Refresh a single server inside of a query (rather than all the servers )

public static RefreshServer ( HServerListRequest hRequest, int iServer ) : void
hRequest HServerListRequest
iServer int
리턴 void

ReleaseRequest() 공개 정적인 메소드

Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress.

RefreshComplete callback is not posted when request is released.

public static ReleaseRequest ( HServerListRequest hServerListRequest ) : void
hServerListRequest HServerListRequest
리턴 void

RequestFavoritesServerList() 공개 정적인 메소드

public static RequestFavoritesServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
iApp AppId_t
ppchFilters MatchMakingKeyValuePair_t
nFilters uint
pRequestServersResponse ISteamMatchmakingServerListResponse
리턴 HServerListRequest

RequestFriendsServerList() 공개 정적인 메소드

public static RequestFriendsServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
iApp AppId_t
ppchFilters MatchMakingKeyValuePair_t
nFilters uint
pRequestServersResponse ISteamMatchmakingServerListResponse
리턴 HServerListRequest

RequestHistoryServerList() 공개 정적인 메소드

public static RequestHistoryServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
iApp AppId_t
ppchFilters MatchMakingKeyValuePair_t
nFilters uint
pRequestServersResponse ISteamMatchmakingServerListResponse
리턴 HServerListRequest

RequestInternetServerList() 공개 정적인 메소드

Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values.

Each call allocates a new asynchronous request object.

Request object must be released by calling ReleaseRequest( hServerListRequest )

public static RequestInternetServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
iApp AppId_t
ppchFilters MatchMakingKeyValuePair_t
nFilters uint
pRequestServersResponse ISteamMatchmakingServerListResponse
리턴 HServerListRequest

RequestLANServerList() 공개 정적인 메소드

public static RequestLANServerList ( AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
iApp AppId_t
pRequestServersResponse ISteamMatchmakingServerListResponse
리턴 HServerListRequest

RequestSpectatorServerList() 공개 정적인 메소드

public static RequestSpectatorServerList ( AppId_t iApp, MatchMakingKeyValuePair_t ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse ) : HServerListRequest
iApp AppId_t
ppchFilters MatchMakingKeyValuePair_t
nFilters uint
pRequestServersResponse ISteamMatchmakingServerListResponse
리턴 HServerListRequest

ServerRules() 공개 정적인 메소드

Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side)

public static ServerRules ( uint unIP, ushort usPort, ISteamMatchmakingRulesResponse pRequestServersResponse ) : HServerQuery
unIP uint
usPort ushort
pRequestServersResponse ISteamMatchmakingRulesResponse
리턴 HServerQuery