Data Channel API

A data channel labeled as "control" will be setup from server. This data channel will be used for WebRTC Renegotiation or other connection actions.

Publisher

CommandServer/Client SendUsage
SDP_OFFERClient SendWebRTC Renegotiation
SDP_ANSWERServer SendWebRTC Renegotiation
STOPClient SendActively close peer connection. (There is connection timeout for leaving peers even without this command.)
OKServer SendLet client know server received the message but there is no special actions.

Subscriber

CommandServer/Client SendUsage
SDP_OFFERServer SendWebRTC Renegotiation
SDP_ANSWERClient SendWebRTC Renegotiation
PUB_JOINServer SendA publisher joined the room
PUB_LEFTServer SendA publisher left the room
STOPClient SendActively close peer connection. (There is connection timeout for leaving peers even without this command.)
OKServer SendLet client know server received the message but there is no special actions.