Skip to content

Commit

Permalink
Refresh channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheeo committed Dec 16, 2015
1 parent 57aacbd commit e2a0430
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/connectivity/turn.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ def schedule_refresh(self):

def refresh(self):
self._write(STUNMessage('Refresh').to_bytes())
for addr, channel in self.bindings.items():
self._write(STUNMessage('ChannelBind',
[('CHANNEL-NUMBER', channel),
('XOR-PEER-ADDRESS', addr)]))

def __str__(self):
return "TURNSession({}, {}, {}, {})".format(self.state, self.mapped_addr, self.relayed_addr, self.lifetime)

0 comments on commit e2a0430

Please sign in to comment.