github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/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  }