Add PROXY TestPeer client

This commit is contained in:
Vinnie Falco
2013-08-10 03:37:03 -07:00
parent 43c065c5b6
commit e0eaa08597
8 changed files with 94 additions and 2 deletions

View File

@@ -34,6 +34,13 @@ TestPeerBasics::Model TestPeerLogicSyncClient::get_model () const noexcept
void TestPeerLogicSyncClient::on_connect ()
{
{
// pre-handshake hook is optional
on_pre_handshake ();
if (failure (error ()))
return ;
}
if (socket ().requires_handshake ())
{
if (failure (socket ().handshake (get_role (), error ())))
@@ -95,3 +102,7 @@ void TestPeerLogicSyncClient::on_connect ()
if (failure (socket ().close (error ())))
return;
}
void TestPeerLogicSyncClient::on_pre_handshake ()
{
}