JRTCSDK-Android v2401.0
视频客服 API 文档
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
JRTCClient.JRTCP2PSession接口 参考

Public 成员函数

void connect (String otherHost, int otherPort)
 
void close ()
 
boolean send (String content)
 
String getHost ()
 
int getPort ()
 
String getOtherHost ()
 
int getOtherPort ()
 
int getState ()
 

详细描述

p2p 消息会话

成员函数说明

◆ close()

void close ( )

关闭连接

◆ connect()

void connect ( String  otherHost,
int  otherPort 
)

连接

参数
otherHost对端地址
otherPort对端端口

◆ getHost()

String getHost ( )

获得本端 IP 地址

返回
本端 IP 地址

◆ getOtherHost()

String getOtherHost ( )

获得远端 IP 地址

返回
远端 IP 地址

◆ getOtherPort()

int getOtherPort ( )

获得远端端口

返回
远端端口

◆ getPort()

int getPort ( )

获得本端端口

返回
本端端口

◆ getState()

int getState ( )

获得 P2P 会话状态

返回
P2P 会话状态

◆ send()

boolean send ( String  content)

发送消息

参数
content消息内容