add a max levin packet size by command type

This commit is contained in:
moneromooo-monero 2020-12-31 16:51:59 +00:00
parent 16c780d568
commit b652d598d1
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
8 changed files with 60 additions and 4 deletions

View file

@ -54,6 +54,7 @@ namespace
{
static constexpr int handshake_command() noexcept { return 1001; }
static constexpr bool handshake_complete() noexcept { return true; }
size_t get_max_bytes(int command) const { return LEVIN_DEFAULT_MAX_PACKET_SIZE; }
};
typedef epee::levin::async_protocol_handler_config<test_levin_connection_context> test_levin_protocol_handler_config;