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