mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
log ice state
This commit is contained in:
parent
5ff8589d0b
commit
c405779a40
1 changed files with 5 additions and 1 deletions
|
@ -365,6 +365,10 @@ func (c *Client) CreateOfferer(finished chan<- error) (pc *webrtc.PeerConnection
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pc.OnICEConnectionStateChange(func(connectionState webrtc.ICEConnectionState) {
|
||||||
|
log.Debugf("ICE Connection State has changed: %s", connectionState.String())
|
||||||
|
})
|
||||||
|
|
||||||
// Register channel opening handling
|
// Register channel opening handling
|
||||||
sendData := func(buf []byte) error {
|
sendData := func(buf []byte) error {
|
||||||
// fmt.Printf("sent message: %x\n", md5.Sum(buf))
|
// fmt.Printf("sent message: %x\n", md5.Sum(buf))
|
||||||
|
@ -394,7 +398,7 @@ func (c *Client) CreateOfferer(finished chan<- error) (pc *webrtc.PeerConnection
|
||||||
timeStart := time.Now()
|
timeStart := time.Now()
|
||||||
for {
|
for {
|
||||||
for {
|
for {
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(1 * time.Millisecond)
|
||||||
if readyToBegin {
|
if readyToBegin {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue