github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/chapar/upper-handler-empty.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package chapar
     4  
     5  import "../protocol"
     6  
     7  // UpperHandlerNonExist use for default and empty switch port due to non of ports can be nil!
     8  type UpperHandlerNonExist struct {
     9  	headerID byte
    10  }
    11  
    12  // RegisterMultiplexer register given multiplexer to the port for further usage!
    13  func (h *UpperHandlerNonExist) HeaderID() (id byte) { return h.headerID }
    14  
    15  // Receive get packet to route it to its path!
    16  func (h *UpperHandlerNonExist) Receive(conn protocol.NetworkLinkConnection, packet []byte) {}
    17  
    18  func (h *UpperHandlerNonExist) RegisterAppMultiplexer(appMux NetworkTransportAppMultiplexer) {}
    19  func (h *UpperHandlerNonExist) UnRegisterAppMultiplexer(appMux NetworkTransportAppMultiplexer) {}
    20  
    21  func (h *UpperHandlerNonExist) Shutdown() {}