client Channel search bypass

Bypass the broadcast search phase and directly connect
to a specific server and issue CMD_CREATE_CHANNEL.

Note, due to pvAccessCPP buggyness, this can only be relied
upon to connect with the unadvertised magic 'server' PV.
This commit is contained in:
Michael Davidsaver
2021-07-03 13:20:20 -07:00
parent 55f8b91ede
commit 5d3a21f030
6 changed files with 88 additions and 33 deletions
+10
View File
@@ -39,6 +39,16 @@ Connection::~Connection()
cleanup();
}
std::shared_ptr<Connection> Connection::build(const std::shared_ptr<ContextImpl>& context,
const SockAddr& serv)
{
std::shared_ptr<Connection> ret;
auto it = context->connByAddr.find(serv);
if(it==context->connByAddr.end() || !(ret = it->second.lock())) {
context->connByAddr[serv] = ret = std::make_shared<Connection>(context, serv);
}
return ret;
}
void Connection::createChannels()
{