23 lines
426 B
Go
23 lines
426 B
Go
|
package client
|
||
|
|
||
|
import (
|
||
|
"git.loafle.net/commons_go/rpc"
|
||
|
"git.loafle.net/commons_go/rpc/client"
|
||
|
"git.loafle.net/commons_go/rpc/protocol"
|
||
|
)
|
||
|
|
||
|
func NewClientHandler(addr string, codec protocol.ClientCodec, notifyRegistry rpc.Registry) ClientHandler {
|
||
|
ch := &ClientHandlers{}
|
||
|
ch.addr = addr
|
||
|
ch.RPCRegistry = notifyRegistry
|
||
|
ch.Codec = codec
|
||
|
|
||
|
return ch
|
||
|
}
|
||
|
|
||
|
type ClientHandlers struct {
|
||
|
client.ClientHandlers
|
||
|
|
||
|
addr string
|
||
|
}
|