NIM C# SDK  6.3.0
NIM.NIMRts Namespace Reference

Classes

class  RtsConnectInfo
 通道连接成功后会返回服务器录制信息 More...
 
class  RtsMemberChangeInfo
 
class  RtsNativeMethods
 
class  RtsSendDataInfo
 
class  RtsStartInfo
 发起rts或者接起rts时的配置参数 More...
 
class  RtsSyncAckInfo
 收到本人其他端已经处理的通知 More...
 

Enumerations

enum  NIMRtsChannelType { NIMRtsChannelType.kNIMRtsChannelTypeNone = 0, NIMRtsChannelType.kNIMRtsChannelTypeTcp = 1, NIMRtsChannelType.kNIMRtsChannelTypeUdp = 2, NIMRtsChannelType.kNIMRtsChannelTypeVchat = 4 }
 rts通道类型 More...
 
enum  NIMRtsMemberStatus { NIMRtsMemberStatus.kNIMRtsMemberStatusJoined = 0, NIMRtsMemberStatus.kNIMRtsMemberStatusLeaved = 1 }
 成员变化类型 More...
 
enum  NIMRtsMemberLeftType { NIMRtsMemberLeftType.kNIMRtsMemberLeftTimeout = -1, NIMRtsMemberLeftType.kNIMRtsMemberLeftNormal = 0 }
 成员退出类型 More...
 
enum  NIMRtsVideoChatMode { NIMRtsVideoChatMode.kNIMRtsVideoChatModeAudio = 1, NIMRtsVideoChatMode.kNIMRtsVideoChatModeVideo = 2 }
 音视频通话类型 More...
 
enum  NIMRtsConnectStatus {
  NIMRtsConnectStatus.kNIMRtsConnectStatusDisconn = 0, NIMRtsConnectStatus.kNIMRtsConnectStatusStartFail = 1, NIMRtsConnectStatus.kNIMRtsConnectStatusTimeout = 101, NIMRtsConnectStatus.kNIMRtsConnectStatusSuccess = 200,
  NIMRtsConnectStatus.kNIMRtsConnectStatusInvalidParam = 400, NIMRtsConnectStatus.kNIMRtsConnectStatusDesKey = 401, NIMRtsConnectStatus.kNIMRtsConnectStatusInvalidRequst = 417, NIMRtsConnectStatus.kNIMRtsConnectStatusServerUnknown = 500,
  NIMRtsConnectStatus.kNIMRtsConnectStatusLogout = 1001
}
 音视频服务器连接状态类型 More...
 

Functions

delegate void StartResHandler (int code, string sessionId, int channelType, string uid)
 创建通道返回结果 More...
 
internal delegate void NimRtsStartCbFunc (int code, string sessionId, int channelType, string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnStartNotify (string sessionId, int channelType, string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string customInfo)
 收到对方创建通道通知 More...
 
internal delegate void NimRtsStartNotifyCbFunc (string sessionId, int channelType, string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void AckResHandler (int code, string sessionId, int channelType, bool accept)
 回复收到邀请的结果 More...
 
internal delegate void NimRtsAckResCbFunc (int code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string sessionId, int channelType, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.I1)]bool accept, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnAckNotify (string sessionId, int channelType, bool accept, string uid)
 收到对方回复邀请的通知 More...
 
internal delegate void NimRtsAckNotifyCbFunc (string sessionId, int channelType, bool accept, string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnSyncAckNotify (string sessionId, int channelType, bool accept, int client)
 收到本人在其他端回复邀请的同步通知 More...
 
internal delegate void NimRtsSyncAckNotifyCbFunc (string sessionId, int channelType, bool accept, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnConnectNotify (string sessionId, int channelType, int code)
 通道连接状态通知 More...
 
delegate void NimRtsConnectNotifyCbFunc (string sessionId, int channelType, int code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnMemberNotify (string sessionId, int channelType, int type, string uid, RtsMemberChangeInfo info)
 通道连接成员变化通知 More...
 
internal delegate void NimRtsMemberChangeCbFunc (string sessionId, int channelType, int type, string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void ControlResHandler (int code, string sessionId, string info)
 控制接口调用结果 More...
 
internal delegate void NimRtsControlResCbFunc (int code, string sessionId, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string info, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnControlNotify (string sessionId, string info, string uid)
 控制消息通知回调 More...
 
internal delegate void NimRtsControlNotifyCbFunc (string sessionId, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string info, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void HangupResHandler (int code, string sessionId)
 挂断会话调用结果 More...
 
internal delegate void NimRtsHangupResCbFunc (int code, string sessionId, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnHangupNotify (string sessionId, string uid)
 挂断会话通知回调 More...
 
internal delegate void NimRtsHangupNotifyCbFunc (string sessionId, string uid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void OnRecData (string sessionId, int channelType, string uid, IntPtr data, int size)
 数据监听回调 More...
 
internal delegate void NimRtsRecDataCbFunc (string sessionId, int channelType, string uid, IntPtr data, int size, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string jsonExtension, IntPtr userData)
 
delegate void NimRtsCreateCbFunc (int code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 创建多人rts返回结果 More...
 
delegate void NimRtsJoinCbFunc (int code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string session_id, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 加入多人rts返回结果 More...
 
delegate void NimRtsOptCbFunc (int code, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string session_id, int channel_type, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string json_extension, IntPtr user_data)
 

Enumeration Type Documentation

◆ NIMRtsChannelType

rts通道类型

Enumerator
kNIMRtsChannelTypeNone 

无通道

kNIMRtsChannelTypeTcp 

tcp通道

kNIMRtsChannelTypeUdp 

udp通道 暂不支持

kNIMRtsChannelTypeVchat 

音视频通道

◆ NIMRtsConnectStatus

音视频服务器连接状态类型

Enumerator
kNIMRtsConnectStatusDisconn 

断开连接

kNIMRtsConnectStatusStartFail 

启动失败

kNIMRtsConnectStatusTimeout 

超时

kNIMRtsConnectStatusSuccess 

成功

kNIMRtsConnectStatusInvalidParam 

错误参数

kNIMRtsConnectStatusDesKey 

密码加密错误

kNIMRtsConnectStatusInvalidRequst 

错误请求

kNIMRtsConnectStatusServerUnknown 

服务器内部错误

kNIMRtsConnectStatusLogout 

退出

◆ NIMRtsMemberLeftType

成员退出类型

Enumerator
kNIMRtsMemberLeftTimeout 

成员超时掉线

kNIMRtsMemberLeftNormal 

成员离开

◆ NIMRtsMemberStatus

成员变化类型

Enumerator
kNIMRtsMemberStatusJoined 

成员进入

kNIMRtsMemberStatusLeaved 

成员退出

◆ NIMRtsVideoChatMode

音视频通话类型

Enumerator
kNIMRtsVideoChatModeAudio 

语音通话模式

kNIMRtsVideoChatModeVideo 

视频通话模式

Function Documentation

◆ AckResHandler()

delegate void NIM.NIMRts.AckResHandler ( int  code,
string  sessionId,
int  channelType,
bool  accept 
)

回复收到邀请的结果

Parameters
code调用结果
sessionId会话id
channelType通道类型
accept是否接受

◆ ControlResHandler()

delegate void NIM.NIMRts.ControlResHandler ( int  code,
string  sessionId,
string  info 
)

控制接口调用结果

Parameters
code调用结果
sessionId会话id
info透传数据

◆ HangupResHandler()

delegate void NIM.NIMRts.HangupResHandler ( int  code,
string  sessionId 
)

挂断会话调用结果

Parameters
code调用结果
sessionId会话id

◆ NimRtsAckNotifyCbFunc()

internal delegate void NIM.NIMRts.NimRtsAckNotifyCbFunc ( string  sessionId,
int  channelType,
bool  accept,
string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsAckResCbFunc()

internal delegate void NIM.NIMRts.NimRtsAckResCbFunc ( int  code,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  sessionId,
int  channelType,
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.I1)] bool  accept,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsConnectNotifyCbFunc()

delegate void NIM.NIMRts.NimRtsConnectNotifyCbFunc ( string  sessionId,
int  channelType,
int  code,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsControlNotifyCbFunc()

internal delegate void NIM.NIMRts.NimRtsControlNotifyCbFunc ( string  sessionId,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  info,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsControlResCbFunc()

internal delegate void NIM.NIMRts.NimRtsControlResCbFunc ( int  code,
string  sessionId,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  info,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsCreateCbFunc()

delegate void NIM.NIMRts.NimRtsCreateCbFunc ( int  code,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  json_extension,
IntPtr  user_data 
)

创建多人rts返回结果

Parameters
code
json_extension
user_data

◆ NimRtsHangupNotifyCbFunc()

internal delegate void NIM.NIMRts.NimRtsHangupNotifyCbFunc ( string  sessionId,
string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsHangupResCbFunc()

internal delegate void NIM.NIMRts.NimRtsHangupResCbFunc ( int  code,
string  sessionId,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsJoinCbFunc()

delegate void NIM.NIMRts.NimRtsJoinCbFunc ( int  code,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  session_id,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  json_extension,
IntPtr  user_data 
)

加入多人rts返回结果

Parameters
code
session_id
json_extension
user_data

◆ NimRtsMemberChangeCbFunc()

internal delegate void NIM.NIMRts.NimRtsMemberChangeCbFunc ( string  sessionId,
int  channelType,
int  type,
string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsOptCbFunc()

delegate void NIM.NIMRts.NimRtsOptCbFunc ( int  code,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  session_id,
int  channel_type,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  json_extension,
IntPtr  user_data 
)

◆ NimRtsRecDataCbFunc()

internal delegate void NIM.NIMRts.NimRtsRecDataCbFunc ( string  sessionId,
int  channelType,
string  uid,
IntPtr  data,
int  size,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsStartCbFunc()

internal delegate void NIM.NIMRts.NimRtsStartCbFunc ( int  code,
string  sessionId,
int  channelType,
string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsStartNotifyCbFunc()

internal delegate void NIM.NIMRts.NimRtsStartNotifyCbFunc ( string  sessionId,
int  channelType,
string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ NimRtsSyncAckNotifyCbFunc()

internal delegate void NIM.NIMRts.NimRtsSyncAckNotifyCbFunc ( string  sessionId,
int  channelType,
bool  accept,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  jsonExtension,
IntPtr  userData 
)

◆ OnAckNotify()

delegate void NIM.NIMRts.OnAckNotify ( string  sessionId,
int  channelType,
bool  accept,
string  uid 
)

收到对方回复邀请的通知

Parameters
sessionId会话id
channelType通道类型
accept是否接受
uid对方帐号

◆ OnConnectNotify()

delegate void NIM.NIMRts.OnConnectNotify ( string  sessionId,
int  channelType,
int  code 
)

通道连接状态通知

Parameters
sessionId会话id
channelType通道类型
code连接状态 非200都是未连接

◆ OnControlNotify()

delegate void NIM.NIMRts.OnControlNotify ( string  sessionId,
string  info,
string  uid 
)

控制消息通知回调

Parameters
sessionId会话id
info透传数据
uid对方帐号

◆ OnHangupNotify()

delegate void NIM.NIMRts.OnHangupNotify ( string  sessionId,
string  uid 
)

挂断会话通知回调

Parameters
sessionId会话id
uid对方帐号

◆ OnMemberNotify()

delegate void NIM.NIMRts.OnMemberNotify ( string  sessionId,
int  channelType,
int  type,
string  uid,
RtsMemberChangeInfo  info 
)

通道连接成员变化通知

Parameters
sessionId会话id
channelType通道类型
type成员变化类型NIMRtsMemberStatus
uid对方帐号

◆ OnRecData()

delegate void NIM.NIMRts.OnRecData ( string  sessionId,
int  channelType,
string  uid,
IntPtr  data,
int  size 
)

数据监听回调

Parameters
sessionId会话id
channelType通道类型
uid对方帐号
data接受的数据
sizedata的数据长度

◆ OnStartNotify()

delegate void NIM.NIMRts.OnStartNotify ( string  sessionId,
int  channelType,
string  uid,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Utf8StringMarshaler))] string  customInfo 
)

收到对方创建通道通知

Parameters
sessionId会话id
channelType通道类型 如要tcp+音视频,则channel_type=kNIMRtsChannelTypeTcp|kNIMRtsChannelTypeVchat
uid对方帐号
customInfo透传数据

◆ OnSyncAckNotify()

delegate void NIM.NIMRts.OnSyncAckNotify ( string  sessionId,
int  channelType,
bool  accept,
int  client 
)

收到本人在其他端回复邀请的同步通知

Parameters
sessionId会话id
channelType通道类型
accept是否接受
client客户端类型NIMClientType

◆ StartResHandler()

delegate void NIM.NIMRts.StartResHandler ( int  code,
string  sessionId,
int  channelType,
string  uid 
)

创建通道返回结果

Parameters
code调用结果
sessionId会话id
channelType通道类型 如要tcp+音视频,则channel_type=kNIMRtsChannelTypeTcp|kNIMRtsChannelTypeVchat
uid对方帐号