freedomjs/freedom — pull request #47 by dborkan (2014-05-28 22:24:52+00:00)
Title: Add initiateConnection to peerconnection's setup method.

Add initiateConnection to core.peerconnection's setup method.

This can be used in the future to specify that one side of a peer-to-peer connection should immediately initiate the connection (open a datachannel), so that the promise returned by peerconnection.setup will fulfill. Currently this parameter is set to false and we work around the issue by immediately calling freedom.transport.send after freedom.transport.setup in socks-to-rtc. Howeverit would be cleaner for callers just to invoke freedom.transport.setup without needing to call .send afterwards (and freedom.transport/peerconnection would immediately establish the connection).

Tested with "grunt test" (verified no new failures, as there had already been 4 failures), and manually by building freedom-for-chrome from this branch and testing in socks-rtc