licode初始化解析和room连接
2018-08-08 15:49:20 0 举报
licode初始化解析和room连接
作者其他创作
大纲/内容
sendmessage('token')msg:token+options
roomcontroller
nuve_server
token返回内容:token_id、secure、signature、erizocontroller的8080监听
deleteToken
emit 'room-connected'
JS_publisher
访问3001
example
erizoAgent
Res{room}
nuve_client
getusermedia
listen 8080
listenhttp:3001https:3004
JS_subscriber
generateToken
Res{token}
rpc bind 'erizoController_'+erizo_id
erizoconnection
basic_client
createroom
callrpcaddNewErizoController
insert DBerizocontroller
JS_connection
room.connect
POSTcreateToken
createToken
websocket:3000
[Room.that.connect] socket.connect callback
newerizo.room{token}
socket.connect
rpc back: {erizo_id}
roomsRescreateRoom
funcgetOrCreateRoom
erizoJS_server
basic_server
erizocontroller_server
erizoJScontroller
nuve_resource_db
插入token获取erizocontroller host返回token
newerizo.stream
nuve
erizocontroller
POSTrooms/:room/tokens
listen事件\"token\"\"reconnected\"\"disconnect\"
licode服务脚本启动、初始化连接,进入会议的流程:1、每个客户端采用进入Room(点对点相当于2点会,多方视频相当于多点会),客户端一个Room包含publish的一组流和subscribe的多组流;服务端中一个Room有多组publish的stream(key可能对应clientid),每组publish的stream包括多组订阅的map;2、每个客户端都有一个channel对服务器建立1对1的信令连接(websocket 长连接),用于接收和发送信令;3、每个客户端都有一组connection(对应于peerconnection),用于管理p2p连接建立问题:客户端Room、ErizoConnection、Stream的关系,offer和answer是怎么协商的 服务端subscribe的key是clientid还是streamid,room和erizojs、service的关系
client
stream init
rpc bind'ErizoAgent''ErizoAgent_' + myErizoAgentId(guid)
erizoJS
http:3001https:3004
listen:3000rpc bind 'nuve'
newerizoconnectionManager
channel 'connected'rooms.getOrCreateRoomroom.createClient
erizo_client
POST/rooms
mq queuebind/publish
roomDB addroomservDB addroom
0 条评论
下一页