예제 #1
0
파일: server.go 프로젝트: eclark/protorpc
func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec {
	req := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)}
	resp := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)}

	return &serverCodec{conn, req, resp}
}
예제 #2
0
파일: client.go 프로젝트: eclark/protorpc
func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec {
	req := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)}
	resp := &bufferPair{proto.NewBuffer(nil), proto.NewBuffer(nil)}

	return &clientCodec{conn, req, resp}
}