mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fix the fix
This commit is contained in:
parent
4588bfba66
commit
16ba69ae78
16
net.cpp
16
net.cpp
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <libdevcrypto/Common.h>
|
||||
#include <libdevcore/Worker.h>
|
||||
#include <libp2p/UDP.h>
|
||||
using namespace std;
|
||||
@ -28,21 +29,6 @@ using namespace dev::p2p;
|
||||
namespace ba = boost::asio;
|
||||
namespace bi = ba::ip;
|
||||
|
||||
class Kademlia: UDPSocketEvents
|
||||
{
|
||||
public:
|
||||
Kademlia(): Worker("test",0), m_io(), m_socket(new UDPSocket<Kademlia, 1024>(m_io, *this, 30300)) {}
|
||||
~Kademlia() { m_io.stop(); stopWorking(); }
|
||||
|
||||
void onDisconnected(UDPSocketFace*) {};
|
||||
void onReceived(UDPSocketFace*, bi::udp::endpoint const& _from, bytesConstRef _packet) { if (_packet.toString() == "AAAA") success = true; }
|
||||
|
||||
ba::io_service m_io;
|
||||
shared_ptr<UDPSocket<Kademlia, 1024>> m_socket;
|
||||
|
||||
bool success = false;
|
||||
};
|
||||
|
||||
class TestA: UDPSocketEvents, public Worker
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user