mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-13 07:17:28 +00:00
[idd] network: add transport session foundation
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "config/CSettings.h"
|
||||
#include "transport/CTransportManager.h"
|
||||
#include "transport/lgmp/CLGMPTransport.h"
|
||||
#include "transport/network/CNetworkTransport.h"
|
||||
|
||||
#include <new>
|
||||
|
||||
@@ -41,14 +42,23 @@ namespace
|
||||
new (std::nothrow) CLGMPTransport(config));
|
||||
}
|
||||
|
||||
std::unique_ptr<ITransport> CreateNetwork(
|
||||
const TransportInstance& config)
|
||||
{
|
||||
return std::unique_ptr<ITransport>(
|
||||
new (std::nothrow) CNetworkTransport(config));
|
||||
}
|
||||
|
||||
const TransportKind KINDS[] =
|
||||
{
|
||||
{ L"LGMP", 1 },
|
||||
{ L"LGMP", 1 },
|
||||
{ L"NETWORK", 1 },
|
||||
};
|
||||
|
||||
const Provider PROVIDERS[] =
|
||||
{
|
||||
{ CreateLGMP },
|
||||
{ CreateLGMP },
|
||||
{ CreateNetwork },
|
||||
};
|
||||
|
||||
static_assert(ARRAYSIZE(KINDS) == ARRAYSIZE(PROVIDERS),
|
||||
|
||||
Reference in New Issue
Block a user