github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/protocol/network-transport.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package protocol
     4  
     5  /*
     6  **********************************************************************************
     7  Transport (OSI Layer 3-6: Network to Presentation)
     8  **********************************************************************************
     9  */
    10  
    11  // NetworkTransportMultiplexer indicate a transport packet multiplexer.
    12  // OS and APP part must impelement in dedicate structures.
    13  type NetworkTransportMultiplexer interface {
    14  	HeaderID() (headerID NetworkLinkNextHeaderID)
    15  	Receive(conn NetworkLinkConnection, packet []byte)
    16  	Send(packet []byte) (err Error) // to send data use Send() that exist in stream of each connection
    17  
    18  	Shutdown()
    19  }