github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/os/persiaos/network-transport-multiplexer.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package persiaos 4 5 // RegisterNetworkTransportMultiplexer will register multiplexer only if it is GP multiplexer. 6 func (os *os) RegisterNetworkTransportMultiplexer(appMux protocol.NetworkTransportMultiplexer) { 7 switch appMux.HeaderID() { 8 case protocol.NetworkLinkNextHeaderGP: 9 os.gp.RegisterAppMultiplexer(appMux) 10 case protocol.NetworkLinkNextHeaderIPv4: 11 os.ipv4.RegisterAppMultiplexer(appMux) 12 } 13 }