open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
395 stars 182 forks source link

Mismatched argument order in P2P clients #350

Open bshapero89 opened 4 years ago

bshapero89 commented 4 years ago

The method signature for the C++ APIs and the Javascript client are reversed. In C++ the P2PSignalingChannelInterface::SendMessage() has the arguments as the message first, then the targetId.

In the owt-client-javascript, the SignalingChannel()->send() method has the arguments as targetId first, then the message.

This is both confusing and complicates implementing your own signaling protocol on top of the P2PClient classes.

taste1981 commented 4 years ago

We will update C++ API with targetid comes first. Thanks for reporting this issue!