Start of tunnel request handling.

This commit is contained in:
Ian Gulliver
2015-02-07 16:04:40 -08:00
parent 578615a99e
commit 6fc6070d5f
4 changed files with 20 additions and 0 deletions

View File

@@ -302,11 +302,24 @@ void CryptoPubServerConnection::OnHandshake(const TLVNode& decoded) {
bool CryptoPubServerConnection::OnMessage(const TLVNode& message) {
switch (message.GetType()) {
case TLV_TYPE_TUNNEL_REQUEST:
return OnTunnelRequest(message);
default:
return false;
}
}
bool CryptoPubServerConnection::OnTunnelRequest(const TLVNode& message) {
Log() << "New tunnel request" << std::endl;
for (auto child : message.GetChildren()) {
if (child->GetType() != TLV_TYPE_CHANNEL) {
continue;
}
Log() << "Channel" << std::endl;
}
return true;
}
void CryptoPubServerConnection::SendHandshake() {
auto handshake = BuildSecureHandshake();
std::string out;