P2PServer: ban peers that disconnect without finishing handshake

This commit is contained in:
SChernykh
2021-09-06 16:17:20 +02:00
parent d3dc4c731f
commit 7b0cc256c5
4 changed files with 18 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ public:
void reset() override;
bool on_connect() override;
bool on_read(char* data, uint32_t size) override;
void on_read_failed(int err) override;
// Both peers send handshake challenge immediately after a connection is established
// Both peers must have the same consensus ID for handshake to succeed