membraneframework-labs / membrane_libnice_plugin

Membrane plugin for ICE protocol
Apache License 2.0
11 stars 1 forks source link

Return local host candidates together #5

Open mickel8 opened 4 years ago

mickel8 commented 4 years ago

At this moment local host candidates are returned one by one. Because in most cases they will not be selected for communication it is better to send them together to the peer to save time.

It seems that libnice doesn't expose specific function for gathering local host candidates. One way to do that is to manually check if candidate is of type host, accumulate it and then return to the pipeline for sending to the peer.

mat-hek commented 4 years ago

One way to do that is to manually check if candidate is of type host, accumulate it and then return to the pipeline for sending to the peer.

How can we tell we accumulated all the candidates so they can be sent? I'm also not sure if it can reduce the connection time. Maybe there's a reason why libnice returns them one by one?