mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-18 20:50:09 +08:00
* refactor: migrate from grpc to protorpc * fix * fix * fix * cleanup * Update mainwindow_grpc.cpp * Update RPC.cpp * fix --------- Co-authored-by: parhelia512 <0011d3@gmail.com>
49 lines
1.0 KiB
C++
49 lines
1.0 KiB
C++
// Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#pragma once
|
|
|
|
#ifndef PROTORPC_WIRE_H__
|
|
#define PROTORPC_WIRE_H__
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#include "3rdparty/protorpc/wire.pb/wire.pb.h"
|
|
#include "3rdparty/protorpc/rpc_error.h"
|
|
#include "3rdparty/protorpc/rpc_conn.h"
|
|
|
|
namespace protorpc {
|
|
namespace wire {
|
|
|
|
Error SendRequest(Conn* conn,
|
|
uint64_t id, const std::string& serviceMethod,
|
|
const ::std::string* request
|
|
);
|
|
Error RecvRequestHeader(Conn* conn,
|
|
RequestHeader* header
|
|
);
|
|
Error RecvRequestBody(Conn* conn,
|
|
const RequestHeader* header,
|
|
::std::string* request
|
|
);
|
|
|
|
Error SendResponse(Conn* conn,
|
|
uint64_t id, const std::string& error,
|
|
const ::std::string* response
|
|
);
|
|
Error RecvResponseHeader(Conn* conn,
|
|
ResponseHeader* header
|
|
);
|
|
Error RecvResponseBody(Conn* conn,
|
|
const ResponseHeader* header,
|
|
::std::string* request
|
|
);
|
|
|
|
} // namespace wire
|
|
} // namespace protorpc
|
|
|
|
#endif // PROTORPC_WIRE_H__
|
|
|