备份CatanBuilding瘦身独立工程
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using com.fpnn.common;
|
||||
using com.fpnn.rtm;
|
||||
using UnityEngine;
|
||||
|
||||
namespace com.fpnn.livedata
|
||||
{
|
||||
public partial class IM
|
||||
{
|
||||
RTMClient client;
|
||||
|
||||
public IM(in RTMClient client)
|
||||
{
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public bool Login(AuthDelegate callback, string token, int timeout = 0)
|
||||
{
|
||||
return client.Login((long projectId, long uid, bool successful, int errorCode) =>
|
||||
{
|
||||
RTMControlCenter.callbackQueue.PostAction(() =>
|
||||
{
|
||||
callback(projectId, uid, successful, errorCode);
|
||||
});
|
||||
}, token, timeout);
|
||||
}
|
||||
|
||||
public bool LoginV2(AuthDelegate callback, string token, long ts, int timeout = 0)
|
||||
{
|
||||
return client.Login((long projectId, long uid, bool successful, int errorCode) =>
|
||||
{
|
||||
RTMControlCenter.callbackQueue.PostAction(() =>
|
||||
{
|
||||
callback(projectId, uid, successful, errorCode);
|
||||
});
|
||||
}, token, ts, timeout);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
client.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user