github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/protocol/networking-osi_7-application.go (about)

     1  /* For license and copyright information please see the LEGAL file in the code repository */
     2  
     3  package protocol
     4  
     5  /*
     6  **********************************************************************************
     7  Application (OSI Layer 7: Application)
     8  **********************************************************************************
     9  */
    10  
    11  type NetworkApplication_ProtocolID = MediaTypeID
    12  
    13  // NetworkApplication_Multiplexer
    14  type NetworkApplication_Multiplexer interface {
    15  	GetNetworkApplicationHandler(protocolID NetworkApplication_ProtocolID) NetworkApplication_Handler
    16  	SetNetworkApplicationHandler(nah NetworkApplication_Handler)
    17  	DeleteNetworkApplicationHandler(protocolID NetworkApplication_ProtocolID)
    18  }
    19  
    20  // NetworkApplication_Handler
    21  type NetworkApplication_Handler interface {
    22  	NetworkCommonHandler
    23  
    24  	// SendBidirectionalRequest()
    25  	// SendUnidirectionalRequest()
    26  	// Due to each application handler wants its signature, implement it as a pure function inside each package.
    27  	// srpc.SendBidirectionalRequest(conn Connection, service Service, req Codec) (res Codec, err Error)
    28  	// http.SendBidirectionalRequest(conn Connection, service Service, httpReq *Request) (httpRes *Response, err Error) {
    29  }