• 매치메이킹 SDK (ver 1.0.5.0)
  • 유니티 데모 설치하기
  • 유니티 C# 코드 가이드
  • API Documentation
Show / Hide Table of Contents
  • Stove.PCSDK.NET.Matchmaking
    • StoveMatchSDK
    • StovePCMatchmakingAffiliation
    • StovePCMatchmakingBanUser
    • StovePCMatchmakingCallback
    • StovePCMatchmakingCallback.OnBanUser
    • StovePCMatchmakingCallback.OnConnect
    • StovePCMatchmakingCallback.OnCreateLobby
    • StovePCMatchmakingCallback.OnDestroyLobby
    • StovePCMatchmakingCallback.OnDisconnect
    • StovePCMatchmakingCallback.OnEndGame
    • StovePCMatchmakingCallback.OnGetBanUserList
    • StovePCMatchmakingCallback.OnGetLobbyData
    • StovePCMatchmakingCallback.OnGetLobbyUserList
    • StovePCMatchmakingCallback.OnGetMyFriendList
    • StovePCMatchmakingCallback.OnGetMyLobbyList
    • StovePCMatchmakingCallback.OnJoinLobby
    • StovePCMatchmakingCallback.OnKickUser
    • StovePCMatchmakingCallback.OnLeaveLobby
    • StovePCMatchmakingCallback.OnRecvLobbyBinarydata
    • StovePCMatchmakingCallback.OnRecvLobbyInvitation
    • StovePCMatchmakingCallback.OnRecvLobbyMessage
    • StovePCMatchmakingCallback.OnRecvRejectLobbyInvitation
    • StovePCMatchmakingCallback.OnRequestLobbyList
    • StovePCMatchmakingCallback.OnSendLobbyBinarydata
    • StovePCMatchmakingCallback.OnSendLobbyInvitation
    • StovePCMatchmakingCallback.OnSendLobbyMessage
    • StovePCMatchmakingCallback.OnSendRejectLobbyInvitation
    • StovePCMatchmakingCallback.OnSetLobbyData
    • StovePCMatchmakingCallback.OnSetLobbyOwner
    • StovePCMatchmakingCallback.OnSetLobbyUserdata
    • StovePCMatchmakingCallback.OnStartGame
    • StovePCMatchmakingCallback.OnUnBanUser
    • StovePCMatchmakingCallback.OnUpdateLobbyData
    • StovePCMatchmakingCallback.OnUpdateLobbyUser
    • StovePCMatchmakingCallback.OnUserJoin
    • StovePCMatchmakingCallback.OnUserLeave
    • StovePCMatchmakingCallback.OnUserStatusChanged
    • StovePCMatchmakingComparisonType
    • StovePCMatchmakingConnectionState
    • StovePCMatchmakingCreateLobby
    • StovePCMatchmakingDestroyLobby
    • StovePCMatchmakingDisconnectCode
    • StovePCMatchmakingEndGame
    • StovePCMatchmakingError
    • StovePCMatchmakingFriendInfo
    • StovePCMatchmakingFunctionType
    • StovePCMatchmakingGetBanUserList
    • StovePCMatchmakingGetLobbyData
    • StovePCMatchmakingGetLobbyUserList
    • StovePCMatchmakingGetMyFriendList
    • StovePCMatchmakingGetMyLobbyList
    • StovePCMatchmakingJoinLobby
    • StovePCMatchmakingKickUser
    • StovePCMatchmakingLeaveLobby
    • StovePCMatchmakingLobby
    • StovePCMatchmakingLobbyInfo
    • StovePCMatchmakingLobbyUser
    • StovePCMatchmakingMetadata
    • StovePCMatchmakingRecvLobbyBinarydata
    • StovePCMatchmakingRecvLobbyInvitation
    • StovePCMatchmakingRecvLobbyMessage
    • StovePCMatchmakingRecvRejectLobbyInvitation
    • StovePCMatchmakingRequestLobbyList
    • StovePCMatchmakingResult
    • StovePCMatchmakingSendLobbyBinarydata
    • StovePCMatchmakingSendLobbyInvitation
    • StovePCMatchmakingSendLobbyMessage
    • StovePCMatchmakingSendRejectLobbyInvitation
    • StovePCMatchmakingSetLobbyData
    • StovePCMatchmakingSetLobbyOwner
    • StovePCMatchmakingSetLobbyUserdata
    • StovePCMatchmakingStartGame
    • StovePCMatchmakingUnBanUser
    • StovePCMatchmakingUpdateLobbyData
    • StovePCMatchmakingUpdateLobbyUser
    • StovePCMatchmakingUserJoin
    • StovePCMatchmakingUserLeave
    • StovePCMatchmakingUserStatus
    • StovePCMatchmakingUserStatusChanged

Class StoveMatchSDK

매치메이킹 SDK 클래스

Inheritance
System.Object
StoveMatchSDK
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Stove.PCSDK.NET.Matchmaking
Assembly: StovePCMatchmaking64.Net.dll
Syntax
public class StoveMatchSDK

Properties

Callback

Declaration
public static StovePCMatchmakingCallback Callback { get; }
Property Value
Type Description
StovePCMatchmakingCallback

콜백 구조체

LogLevel

Declaration
public static int LogLevel { get; set; }
Property Value
Type Description
System.Int32

로그 레벨

Nickname

Declaration
public static string Nickname { get; }
Property Value
Type Description
System.String

닉네임

UID

Declaration
public static ulong UID { get; }
Property Value
Type Description
System.UInt64

유저 아이디

Methods

AddRequestLobbyListFilter(String, String, StovePCMatchmakingComparisonType)

로비 검색 조건을 추가합니다. 중첩 호출할 수 있으며, 중첩시마다 앞의 검색 조건에 "AND" 논리 연산이 됩니다. 예시 : "map = 1 and mode = 2" 인 로비 검색 StovePCMatchmaking_AddRequestLobbyListFilter("map", "1", "="); StovePCMatchmaking_AddRequestLobbyListFilter("mode", "2", "="); StovePCMatchmaking_RequestLobbyList() StovePCMatchmaking_RequestLobbyList 가 호출되면 로비 검색 조건은 초기화됩니다.

Declaration
public static void AddRequestLobbyListFilter(string keyToMatch, string valueToMatch, StovePCMatchmakingComparisonType oper)
Parameters
Type Name Description
System.String keyToMatch

메타 데이터 키

System.String valueToMatch

메타 데이터 값

StovePCMatchmakingComparisonType oper

비교 연산자 [ = != > >= < <= ]

Remarks

Callbacks 이 없습니다.

BanUser(String, UInt64)

유저가 로비에 있을 경우 추방하며, 이후 로비 접속을 제한합니다.

Declaration
public static void BanUser(string lobby, ulong UID)
Parameters
Type Name Description
System.String lobby

밴 할 로비 아이디

System.UInt64 UID

밴 할 유저 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnBanUser이 호출됩니다. 밴 대상자는 StovePCMatchmakingCallback.OnLeaveLobbyOnLeaveLobby, 다른 로비 유저는 StovePCMatchmakingCallback.OnUserLeave가 호출됩니다.

Connect(String)

매치메이킹 서버에 접속합니다.

Declaration
public static void Connect(string nickname)
Parameters
Type Name Description
System.String nickname

닉네임

Remarks

Callbacks

StovePCMatchmakingCallback.OnConnect 호출됩니다.

CreateLobby(String, String, Int32)

로비를 생성합니다.

Declaration
public static void CreateLobby(string title, string password, int maxUser)
Parameters
Type Name Description
System.String title

만들고자 하는 로비의 제목

System.String password

패스워드 입력시 암호화된 비공개 로비로 생성

System.Int32 maxUser

로비의 최대 인원수를 설정합니다.

Remarks

Callbacks

StovePCMatchmakingCallback.OnCreateLobbyStovePCMatchmakingCallback.OnJoinLobbyStovePCMatchmakingCallback.OnUserJoinStovePCMatchmakingCallback.OnUpdateLobbyData 가 연속적으로 호출됩니다.

DestroyLobby(String)

로비를 삭제합니다. 방장만 할 수 있습니다.

Declaration
public static void DestroyLobby(string lobby)
Parameters
Type Name Description
System.String lobby

삭제하고자 하는 로비 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnDestroyLobbyStovePCMatchmakingCallback.OnLeaveLobby 가 연속적으로 호출됩니다.

Disconnect()

매치메이킹 서버에서 접속을 종료합니다.

Declaration
public static void Disconnect()
Remarks

Callbacks

StovePCMatchmakingCallback.OnDisconnect 호출됩니다.

EndGame(String, String, Int32)

로비 게임 종료를 매치메이킹 서버에 알립니다. 로비 소유자만 (방장) 할 수 있습니다. 로비는 자동으로 삭제됩니다.

Declaration
public static void EndGame(string lobby, string serverIP, int serverPort)
Parameters
Type Name Description
System.String lobby

로비 아이디

System.String serverIP

연동할 게임 서버 아이피 (연동 필요시)

System.Int32 serverPort

연동할 게임 서버 포트 (연동 필요시)

Remarks

Callbacks

StovePCMatchmakingCallback.OnEndGame StovePCMatchmakingCallback.OnLeaveLobby 가 연속적 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnLeaveLobby이 호출됩니다.

GetConnectionState()

서버 접속상태를 알려줍니다.

Declaration
public static StovePCMatchmakingConnectionState GetConnectionState()
Returns
Type Description
StovePCMatchmakingConnectionState

접속 상태

StovePCMatchmakingConnectionState: 서버 접속 상태 참고

GetLobbyBanUserList(String)

로비 밴 유저의 정보를 확인합니다.

Declaration
public static void GetLobbyBanUserList(string lobby)
Parameters
Type Name Description
System.String lobby

로비 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnGetBanUserList이 호출됩니다.

GetLobbyData(String)

로비 메타 데이터를 확인합니다. 내가 참여한 로비만 확인할 수 있습니다.

Declaration
public static void GetLobbyData(string lobby)
Parameters
Type Name Description
System.String lobby

참여한 로비 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnGetLobbyData가 호출됩니다.

GetLobbyUserList(String)

로비 내 유저의 정보를 확인합니다.

Declaration
public static void GetLobbyUserList(string lobby)
Parameters
Type Name Description
System.String lobby

참여한 로비 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnGetLobbyUserList이 호출됩니다.

GetMyFriendList()

내 친구 정보를 확인합니다.

Declaration
public static void GetMyFriendList()
Remarks

Callbacks

StovePCMatchmakingCallback.OnGetMyFriendList이 호출됩니다.

GetMyLobbyList()

내가 속한 로비 아이디 리스트를 요청합니다.

Declaration
public static void GetMyLobbyList()
Remarks

Callbacks

StovePCMatchmakingCallback.OnGetMyLobbyList 가 호출됩니다.

Initialize()

SDK를 초기화합니다.

Declaration
public static bool Initialize()
Returns
Type Description
System.Boolean

초기화 성공 유무

JoinLobby(String, String)

로비에 참여합니다. 로비가 없을 경우 참여할 수 없습니다.

Declaration
public static void JoinLobby(string lobby, string password)
Parameters
Type Name Description
System.String lobby

참여하고자 하는 로비 아이디

System.String password

패스워드 입력시 암호화된 비공개 로비에 입장

Remarks

Callbacks

StovePCMatchmakingCallback.OnJoinLobbyStovePCMatchmakingCallback.OnUserJoin 가 연속적으로 호출됩니다.

JoinRandomLobby(StovePCMatchmakingMetadata[], Int32)

검색 조건에 맞는 로비에 참여합니다. 검색 조건에 맞는 로비중 하나에 자동으로 참여합니다. 검색 조건에 맞는 로비가 없을시 자동으로 로비를 생성합니다. 검색 조건은 비교 연산자는 "="만 지원하며, 배열 요소는 "AND" 로 연결됩니다.

  • 예시 : "map = 1 and mode = 2" 인 로비 참여
    • Metadata_t ( key = "map", value = "1" )
    • Metadata_t ( key = "mode", value = "2" )
Declaration
public static void JoinRandomLobby(StovePCMatchmakingMetadata[] metaDataArray, int maxUser)
Parameters
Type Name Description
StovePCMatchmakingMetadata[] metaDataArray

검색 조건 메타 데이터

System.Int32 maxUser

로비를 생성할 경우 최대 인원수

Remarks

Callbacks

StovePCMatchmakingCallback.OnJoinLobby StovePCMatchmakingCallback.OnUserJoin 이 연속적으로 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnUserJoin이 호출됩니다.

KickUser(String, UInt64)

로비에 참여중인 유저를 추방합니다.

Declaration
public static void KickUser(string lobby, ulong UID)
Parameters
Type Name Description
System.String lobby

추방할 로비 아이디

System.UInt64 UID

추방할 유저 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnKickUser이 호출됩니다. 추방 대상자는 StovePCMatchmakingCallback.OnLeaveLobby, 다른 로비 유저는 StovePCMatchmakingCallback.OnUserLeave가 호출됩니다.

LeaveLobby(String)

로비에서 퇴장합니다

Declaration
public static void LeaveLobby(string lobby)
Parameters
Type Name Description
System.String lobby

퇴장할 로비 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnLeaveLobby 이 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnUserLeave이 호출됩니다.

RequestLobbyList(Int64, Int32)

로비를 검색합니다.

Declaration
public static void RequestLobbyList(long pageOffset, int maxCount)
Parameters
Type Name Description
System.Int64 pageOffset

로비 검색 시작 오프셋

System.Int32 maxCount

페이지당 개수

Remarks

Callbacks

StovePCMatchmakingCallback.OnRequestLobbyList 가 호출됩니다.

RunCallback()

서버에서 수신한 이벤트를 호출합니다. 이 메서드를 호출하기 전까지 수신된 이벤트는 큐에서 대기합니다.

Declaration
public static void RunCallback()

SendLobbyBinarydata(String, Byte[], String)

같은 로비 안의 모든 유저에게 데이터를 송신합니다.

Declaration
public static void SendLobbyBinarydata(string lobby, byte[] data, string meta)
Parameters
Type Name Description
System.String lobby

로비 아이디

System.Byte[] data

송신할 데이터 배열

System.String meta

송신할 메타 데이터(json string, profile등을 상대방에게 보낼 수 있습니다)

Remarks

Callbacks

StovePCMatchmakingCallback.OnSendLobbyBinarydata 이 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnRecvLobbyBinarydata이 호출됩니다.

SendLobbyInvitation(String, UInt64, String)

로비에 초대합니다.

Declaration
public static void SendLobbyInvitation(string lobby, ulong UID, string message)
Parameters
Type Name Description
System.String lobby

초대하고자 하는 로비 아이디

System.UInt64 UID

초대할 유저 아이디

System.String message

초대 메시지

Remarks

Callbacks

StovePCMatchmakingCallback.OnSendLobbyInvitation이 호출됩니다. 피초청인은 StovePCMatchmakingCallback.OnRecvLobbyInvitation이 호출됩니다.

SendLobbyMsg(String, String, String)

같은 로비 내의 모든 유저에게 메시지를 송신합니다.

Declaration
public static void SendLobbyMsg(string lobby, string message, string meta)
Parameters
Type Name Description
System.String lobby

로비 아이디

System.String message

송신 메시지, 금칙어가 적용됩니다.

System.String meta

송신할 메타 데이터(json string, profile등을 상대방에게 보낼 수 있습니다)

Remarks

Callbacks

StovePCMatchmakingCallback.OnSendLobbyMessage 이 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnRecvLobbyMessage이 호출됩니다.

SendRejectLobbyInvitation(String, UInt64)

로비 초대를 거절합니다.

Declaration
public static void SendRejectLobbyInvitation(string lobby, ulong UID)
Parameters
Type Name Description
System.String lobby

초대한 로비 아이디

System.UInt64 UID

초대한 유저 정보

Remarks

Callbacks

StovePCMatchmakingCallback.OnSendRejectLobbyInvitation이 호출됩니다. 초청인에게도 StovePCMatchmakingCallback.OnRecvRejectLobbyInvitation이 호출됩니다.

SetLobbyData(String, String, String)

로비 메타 데이터를 추가/수정 합니다. 로비 소유자만 (방장) 할 수 있습니다.

Declaration
public static void SetLobbyData(string lobby, string key, string value)
Parameters
Type Name Description
System.String lobby

로비 아이디

System.String key

로비 설정 키

System.String value

로비 설정 값

Remarks

Callbacks

StovePCMatchmakingCallback.OnUpdateLobbyData, StovePCMatchmakingCallback.OnSetLobbyData 가 연속적으로 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnUpdateLobbyData가 호출됩니다.

SetLobbyOwner(String, UInt64)

로비 내 다른 유저를 방장으로 지정합니다. 방장만 할 수 있습니다. 나의 등급과 상대 등급이 교환됩니다.

Declaration
public static void SetLobbyOwner(string lobby, ulong UID)
Parameters
Type Name Description
System.String lobby

로비 아이디

System.UInt64 UID

방장을 넘겨줄 로비 내 유저 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnSetLobbyOwner가 호출됩니다. 나의 등급변경을 StovePCMatchmakingCallback.OnUpdateLobbyUser, 방장 이양자의 등급변경을 StovePCMatchmakingCallback.OnUpdateLobbyUser 알립니다.

SetLobbyUserdata(String, String, String)

나의 메타 데이터를 추가/수정 합니다. 로비 입장시 개개인의 유저 설정 데이터 저장소가 할당됩니다. 유저 입장시 로비 내 유저의 메타 데이터는 자동으로 전송됩니다. (ex, 캐릭터 선택, 레디 상태등에 사용합니다)

Declaration
public static void SetLobbyUserdata(string lobby, string key, string value)
Parameters
Type Name Description
System.String lobby

참여한 로비 아이디

System.String key

유저 설정 데이터 키

System.String value

유저 설정 데이터 값

Remarks

Callbacks

StovePCMatchmakingCallback.OnUpdateLobbyUser, StovePCMatchmakingCallback.OnSetLobbyUserdata가 연속적으로 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnUpdateLobbyUser가 호출됩니다.

StartGame(String, String, Int32)

로비 게임 시작을 매치메이킹 서버에 알립니다. 로비 소유자만 (방장) 할 수 있습니다. 더 이상 검색되지 않으며, 로비에 참여할 수 없습니다.

Declaration
public static void StartGame(string lobby, string serverIP, int serverPort)
Parameters
Type Name Description
System.String lobby

로비 아이디

System.String serverIP

연동할 게임 서버 아이피 (연동 필요시)

System.Int32 serverPort

연동할 게임 서버 포트 (연동 필요시)

Remarks

Callbacks

StovePCMatchmakingCallback.OnStartGame 이 호출됩니다. 다른 유저는 StovePCMatchmakingCallback.OnStartGame이 호출됩니다.

UnBanUser(String, UInt64)

로비에서 추방한 유저를 로비 접속 제한에서 해제합니다.

Declaration
public static void UnBanUser(string lobby, ulong UID)
Parameters
Type Name Description
System.String lobby

밴을 해제할 로비 아이디

System.UInt64 UID

밴을 해제할 유저 아이디

Remarks

Callbacks

StovePCMatchmakingCallback.OnUnBanUser이 호출됩니다.

UnInitialize()

할당된 SDK 자원을 해제합니다.

Declaration
public static void UnInitialize()
In This Article
Back to top Generated by DocFX