Exemple #1
0
func NewServerCodec(conn io.ReadWriteCloser, enc filemarshal.Encoder, dec filemarshal.Decoder) rpc.ServerCodec {
	return &serverCodec{conn, filemarshal.NewEncoder(enc), filemarshal.NewDecoder(dec)}
}
Exemple #2
0
func NewClientCodec(conn io.ReadWriteCloser, enc filemarshal.Encoder, dec filemarshal.Decoder) rpc.ClientCodec {
	return &clientCodec{conn, filemarshal.NewEncoder(enc), filemarshal.NewDecoder(dec)}
}