34 lines
1.1 KiB
Go
34 lines
1.1 KiB
Go
package client
|
|
|
|
import (
|
|
"fmt"
|
|
"sync"
|
|
|
|
"git.loafle.net/commons_go/rpc/protocol"
|
|
)
|
|
|
|
type ClientReadWriteCloseHandlers struct {
|
|
ReadMtx sync.RWMutex
|
|
WriteMtx sync.RWMutex
|
|
}
|
|
|
|
func (crwch *ClientReadWriteCloseHandlers) Connect(clientCTX ClientContext) (interface{}, error) {
|
|
return nil, fmt.Errorf("RPC Client RWC Handler: ClientHandlers method[Connect] is not implement")
|
|
}
|
|
|
|
func (crwch *ClientReadWriteCloseHandlers) ReadResponse(clientCTX ClientContext, codec protocol.ClientCodec, conn interface{}) (protocol.ClientResponseCodec, error) {
|
|
return nil, fmt.Errorf("RPC Client RWC Handler: ClientHandlers method[ReadResponse] is not implement")
|
|
}
|
|
|
|
func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX ClientContext, codec protocol.ClientCodec, conn interface{}, method string, params []interface{}, id interface{}) error {
|
|
return fmt.Errorf("RPC Client RWC Handler: ClientHandlers method[WriteRequest] is not implement")
|
|
}
|
|
|
|
func (crwch *ClientReadWriteCloseHandlers) Disconnect(clientCTX ClientContext, conn interface{}) {
|
|
// no op
|
|
}
|
|
|
|
func (crwch *ClientReadWriteCloseHandlers) Validate() {
|
|
|
|
}
|