17 static const auto testing_setup = MakeNoLogFileContext<>();
27 return std::make_unique<FuzzedSock>(fuzzed_data_provider);
37 if (sess.Listen(conn)) {
38 if (sess.Accept(conn)) {
41 }
catch (
const std::runtime_error&) {
49 if (sess.Connect(to, conn, proxy_error)) {
51 conn.
sock->SendComplete(
"verack\n", 10ms, interrupt);
52 }
catch (
const std::runtime_error&) {
const fs::path & GetDataDirNet() const
Get data directory path with appended network identifier.
A combination of a network address (CNetAddr) and a (TCP) port.
static constexpr size_t MAX_MSG_SIZE
The maximum size of an incoming message from the I2P SAM proxy (in bytes).
std::function< std::unique_ptr< Sock >(const CService &)> CreateSock
Socket factory.
An established connection with another peer.
std::unique_ptr< Sock > sock
Connected socket.
FUZZ_TARGET_INIT(i2p, initialize_i2p)