github.com/volts-dev/volts@v0.0.0-20240120094013-5e9c65924106/client/rpc_response.go (about) 1 package client 2 3 import ( 4 "github.com/volts-dev/volts/codec" 5 "github.com/volts-dev/volts/internal/body" 6 "github.com/volts-dev/volts/internal/header" 7 "github.com/volts-dev/volts/transport" 8 ) 9 10 type rpcResponse struct { 11 message *transport.Message 12 header header.Header 13 body *body.TBody // []byte 14 socket transport.Socket 15 contentType codec.SerializeType 16 length int 17 } 18 19 func (self *rpcResponse) Body() *body.TBody { 20 return self.body 21 } 22 23 func (self *rpcResponse) ContentType() string { 24 return self.contentType.String() 25 } 26 27 func (r *rpcResponse) Header() header.Header { 28 return r.header 29 }