@@ -34,16 +34,9 @@ struct Server {
34
34
Server (std::unique_ptr<rpc::Server<lane_size>> &&server)
35
35
: server(std::move(server)) {}
36
36
37
- uint64_t allocation_size (uint64_t port_count) {
38
- uint64_t ret = 0 ;
39
- std::visit ([&](auto &server) { ret = server->allocation_size (port_count); },
40
- server);
41
- return ret;
42
- }
43
-
44
37
rpc_status_t handle_server (
45
- std::unordered_map<rpc_opcode_t , rpc_opcode_callback_ty> &callbacks,
46
- std::unordered_map<rpc_opcode_t , void *> &callback_data) {
38
+ const std::unordered_map<rpc_opcode_t , rpc_opcode_callback_ty> &callbacks,
39
+ const std::unordered_map<rpc_opcode_t , void *> &callback_data) {
47
40
rpc_status_t ret = RPC_STATUS_SUCCESS;
48
41
std::visit (
49
42
[&](auto &server) {
@@ -57,8 +50,8 @@ struct Server {
57
50
template <uint32_t lane_size>
58
51
rpc_status_t handle_server (
59
52
rpc::Server<lane_size> &server,
60
- std::unordered_map<rpc_opcode_t , rpc_opcode_callback_ty> &callbacks,
61
- std::unordered_map<rpc_opcode_t , void *> &callback_data) {
53
+ const std::unordered_map<rpc_opcode_t , rpc_opcode_callback_ty> &callbacks,
54
+ const std::unordered_map<rpc_opcode_t , void *> &callback_data) {
62
55
auto port = server.try_open ();
63
56
if (!port)
64
57
return RPC_STATUS_SUCCESS;
0 commit comments