JRTCSDK-iOS v2401.0
视频客服 API 文档
载入中...
搜索中...
未找到
构造函数 | 属性 | 所有成员列表
JRTCP2PSession类 参考

P2P会话类 更多...

#import <JRTCClient.h>

构造函数

(void) - connect:port:
 连接P2P
 
(bool) - send:
 发送消息
 
(void) - close
 关闭连接
 
(void) - updatState:
 更新P2P的状态
 
(JRTCP2PSessionState- getState
 获取当前P2P连接的状态
 

属性

int pathId
 P2P通道ID
 
NSString *_Nonnull host
 host
 
int port
 端口
 
NSString *_Nullable otherHost
 连接的host
 
int otherPort
 连接的端口
 

详细描述

P2P会话类

函数文档

◆ connect:port:

- (void) connect: (NSString *_Nonnull)  otherHost
port: (int)  otherPort 

连接P2P

参数
otherHost远端host
otherPort远端端口

◆ updatState:

- (void) updatState: (JRTCP2PSessionState state

更新P2P的状态

参数
stateP2P的状态