expose multiplex capacity as flag, un-global some more

This commit is contained in:
Serene Han 2016-06-12 00:20:54 -07:00
parent 2caa47988d
commit b6f15a8d5c
5 changed files with 20 additions and 21 deletions

View file

@ -63,6 +63,8 @@ func NewBrokerChannel(broker string, front string, transport http.RoundTripper)
// with an SDP answer from a designated remote WebRTC peer.
func (bc *BrokerChannel) Negotiate(offer *webrtc.SessionDescription) (
*webrtc.SessionDescription, error) {
log.Println("Negotiating via BrokerChannel...\nTarget URL: ",
bc.Host, "\nFront URL: ", bc.url.Host)
data := bytes.NewReader([]byte(offer.Serialize()))
// Suffix with broker's client registration handler.
request, err := http.NewRequest("POST", bc.url.String()+"client", data)