toggle menu
Android-IMLibCore-SDK
5.12.0
io.rong.imlib
switch theme
search in API
Android-IMLibCore-SDK
/
io.rong.imlib.model
/
ConnectOption
Connect
Option
io.rong.imlib
public
class
ConnectOption
Created by yanke on 2021/7/15
Author
yanke
Members
Constructors
Connect
Option
Link copied to clipboard
io.rong.imlib
public
void
ConnectOption
(
Parcel in
)
Properties
connect
Ext
Link copied to clipboard
io.rong.imlib
public
final
Map
<
String
,
String
>
connectExt
从App服务器端获取的连接附加数据,该数据会通过 SDK -> IMServer -> App的服务器,让App的服务器做连接鉴权
CREATOR
Link copied to clipboard
io.rong.imlib
public
final
static
Creator<ConnectOption>
CREATOR
time
Limit
Link copied to clipboard
io.rong.imlib
public
final
int
timeLimit
连接超时时间,单位:秒。timeLimit <= 0,则 IM 将一直连接,直到连接成功或者无法连接(如 token 非法) timeLimit >0 ,则 IM 将最多连接 timeLimit 秒: 如果在 timeLimit 秒内连接成功,后面再发生了网络变化或前后台切换,SDK 会自动重连; 如果在 timeLimit 秒无法连接成功则不再进行重连,通过 onError 告知连接超时,您需要再自行调用 connect 接口.
token
Link copied to clipboard
io.rong.imlib
public
final
String
token
从服务器端获取的 token (用户身份令牌)
Functions
describe
Contents
Link copied to clipboard
io.rong.imlib
public
int
describeContents
(
)
get
Connect
Ext
Link copied to clipboard
io.rong.imlib
public
Map
<
String
,
String
>
getConnectExt
(
)
get
Time
Limit
Link copied to clipboard
io.rong.imlib
public
int
getTimeLimit
(
)
get
Token
Link copied to clipboard
io.rong.imlib
public
String
getToken
(
)
obtain
Link copied to clipboard
io.rong.imlib
public
static
ConnectOption
obtain
(
String
token
,
int timeLimit
)
public
static
ConnectOption
obtain
(
String
token
,
int timeLimit
,
HashMap
<
String
,
String
>
connectExt
)
write
To
Parcel
Link copied to clipboard
io.rong.imlib
public
void
writeToParcel
(
Parcel dest
,
int flags
)