mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Add network interface registration to pinecone demo (#2750)
### Pull Request Checklist <!-- Please read docs/CONTRIBUTING.md before submitting your pull request --> No additional tests have been added as this simply extends the API for the embedded pinecone demo. Signed-off-by: `Devon Hudson <devonhudson@librem.one>`
This commit is contained in:
parent
b28bbadeb0
commit
90f1985bf3
3 changed files with 17 additions and 3 deletions
|
@ -101,6 +101,20 @@ func (m *DendriteMonolith) SessionCount() int {
|
|||
return len(m.PineconeQUIC.Protocol("matrix").Sessions())
|
||||
}
|
||||
|
||||
func (m *DendriteMonolith) RegisterNetworkInterface(name string, index int, mtu int, up bool, broadcast bool, loopback bool, pointToPoint bool, multicast bool, addrs string) {
|
||||
m.PineconeMulticast.RegisterInterface(pineconeMulticast.InterfaceInfo{
|
||||
Name: name,
|
||||
Index: index,
|
||||
Mtu: mtu,
|
||||
Up: up,
|
||||
Broadcast: broadcast,
|
||||
Loopback: loopback,
|
||||
PointToPoint: pointToPoint,
|
||||
Multicast: multicast,
|
||||
Addrs: addrs,
|
||||
})
|
||||
}
|
||||
|
||||
func (m *DendriteMonolith) SetMulticastEnabled(enabled bool) {
|
||||
if enabled {
|
||||
m.PineconeMulticast.Start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue