‚Äč
DistributedMatchEngine.MatchingEngine Class Reference

Public Member Functions

 MatchingEngine (CarrierInfo carrierInfo=null, NetInterface netInterface=null, UniqueID uniqueID=null, DeviceInfo deviceInfo=null)
 
void SetMelMessaging (MelMessagingInterface melInterface)
 
TimeSpan SetTimeout (int timeout_in_milliseconds)
 
string GetUniqueIDType ()
 
string GetUniqueID ()
 
ulong GetCellID ()
 
string GetCarrierName ()
 
string GenerateDmeHostAddress ()
 
RegisterClientRequest CreateRegisterClientRequest (string orgName, string appName, string appVersion, string authToken=null, UInt32 cellID=0, string uniqueIDType=null, string uniqueID=null, Dictionary< string, string > tags=null)
 
async Task< RegisterClientReplyRegisterClient (RegisterClientRequest request)
 
async Task< RegisterClientReplyRegisterClient (string host, uint port, RegisterClientRequest request)
 
FindCloudletRequest CreateFindCloudletRequest (Loc loc, string carrierName=null, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< FindCloudletReplyFindCloudlet (FindCloudletRequest request, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
async Task< FindCloudletReplyFindCloudlet (string host, uint port, FindCloudletRequest request, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
async Task< FindCloudletReplyRegisterAndFindCloudlet (string orgName, string appName, string appVersion, Loc loc, string carrierName="", string authToken=null, UInt32 cellID=0, string uniqueIDType=null, string uniqueID=null, Dictionary< string, string > tags=null, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
async Task< FindCloudletReplyRegisterAndFindCloudlet (string host, uint port, string orgName, string appName, string appVersion, Loc loc, string carrierName="", string authToken=null, UInt32 cellID=0, string uniqueIDType=null, string uniqueID=null, Dictionary< string, string > tags=null, FindCloudletMode mode=FindCloudletMode.PROXIMITY)
 
VerifyLocationRequest CreateVerifyLocationRequest (Loc loc, string carrierName=null, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< VerifyLocationReplyVerifyLocation (VerifyLocationRequest request)
 
async Task< VerifyLocationReplyVerifyLocation (string host, uint port, VerifyLocationRequest request)
 
AppInstListRequest CreateAppInstListRequest (Loc loc, string carrierName=null, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< AppInstListReplyGetAppInstList (AppInstListRequest request)
 
async Task< AppInstListReplyGetAppInstList (string host, uint port, AppInstListRequest request)
 
QosPositionRequest CreateQosPositionRequest (List< QosPosition > QosPositions, Int32 lteCategory, BandSelection bandSelection, UInt32 cellID=0, Dictionary< string, string > tags=null)
 
async Task< QosPositionKpiStreamGetQosPositionKpi (QosPositionRequest request)
 
async Task< QosPositionKpiStreamGetQosPositionKpi (string host, uint port, QosPositionRequest request)
 
async Task< Socket > GetTCPConnection (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS)
 
async Task< SslStream > GetTCPTLSConnection (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS, bool allowSelfSignedCerts=false)
 
async Task< Socket > GetUDPConnection (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS)
 
async Task< HttpClient > GetHTTPClient (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS, string path="")
 
async Task< HttpClient > GetHTTPSClient (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS, string path="")
 
async Task< ClientWebSocket > GetWebsocketConnection (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS, string path="")
 
async Task< ClientWebSocket > GetSecureWebsocketConnection (FindCloudletReply reply, AppPort appPort, int desiredPort=0, int timeoutMs=DEFAULT_GETCONNECTION_TIMEOUT_MS, string path="")
 
async Task< Socket > GetTCPConnection (string host, int port, int timeoutMs)
 
async Task< SslStream > GetTCPTLSConnection (string host, int port, int timeoutMs, bool allowSelfSignedCerts=false)
 
async Task< Socket > GetUDPConnection (string host, int port, int timeoutMs)
 
async Task< HttpClient > GetHTTPClient (Uri uri)
 
async Task< ClientWebSocket > GetWebsocketConnection (Uri uri, int timeoutMs, bool waitForOpen=true)
 
async Task< ClientWebSocket > GetSecureWebsocketConnection (Uri uri, int timeoutMs, bool waitForOpen=true)
 
string CreateUrl (FindCloudletReply findCloudletReply, AppPort appPort, string protocol, int desiredPort=0, string path="")
 
string GetHost (FindCloudletReply findCloudletReply, AppPort appPort)
 
int GetPort (AppPort appPort, int desiredPort=0)
 
string GetAvailableCellularName (NetworkInterfaceName networkInterfaceName)
 
string GetAvailableWiFiName (NetworkInterfaceName networkInterfaceName)
 
Dictionary< int, AppPortGetAppPortsByProtocol (FindCloudletReply reply, LProto proto)
 
Dictionary< int, AppPortGetTCPAppPorts (FindCloudletReply reply)
 
Dictionary< int, AppPortGetUDPAppPorts (FindCloudletReply reply)
 

Static Public Member Functions

static void ServerRequiresClientCertificateAuthentication (bool required)
 
static void EnableSSLProtocols (SslProtocols[] protocols)
 
static void AddClientCert (string clientCertPath)
 

Static Public Attributes

const string TAG = "MatchingEngine"
 
const UInt32 defaultDmeRestPort = 38001
 
const string carrierNameDefault = "wifi"
 
const string wifiCarrier = "wifi"
 
const string wifiOnlyDmeHost = wifiCarrier + "." + baseDmeHost
 
const string baseDmeHost = "dme.mobiledgex.net"
 
const int DEFAULT_REST_TIMEOUT_MS = 10000
 
const int DEFAULT_GETCONNECTION_TIMEOUT_MS = 10000
 

Properties

CarrierInfo carrierInfo [get, set]
 
NetInterface netInterface [get, set]
 
UniqueID uniqueID [get, set]
 
DeviceInfo deviceInfo [get]
 
bool useOnlyWifi = false [get, set]
 
bool useSSL = true [get, set]
 
string sessionCookie [get, set]
 
RegisterClientRequest LastRegisterClientRequest [get]
 

Detailed Description

Main MobiledgeX SDK class. This class provides functions to find nearest cloudlet with the developer's application instance deployed and to connect to that application instance.

Constructor & Destructor Documentation

◆ MatchingEngine()

DistributedMatchEngine.MatchingEngine.MatchingEngine ( CarrierInfo  carrierInfo = null,
NetInterface  netInterface = null,
UniqueID  uniqueID = null,
DeviceInfo  deviceInfo = null 
)

Constructor for MatchingEngine class.

Parameters
carrierInfo(CarrierInfo):
netInterface(NetInterface):
uniqueID(UniqueID):
deviceInfo(DeviceInfo):

Example

MatchingEngine me = new MatchingEngine(new DummyCarrierInfo(), new SimpleNetInterface(new MacNetworkInterfaceName()), new DummyUniqueID(), new DummyDeviceInfo());

Member Function Documentation

◆ SetMelMessaging()

void DistributedMatchEngine.MatchingEngine.SetMelMessaging ( MelMessagingInterface  melInterface)

A device specific interface.

Member Data Documentation

◆ DEFAULT_GETCONNECTION_TIMEOUT_MS

const int DistributedMatchEngine.MatchingEngine.DEFAULT_GETCONNECTION_TIMEOUT_MS = 10000
static

Default value of GetConnection timeouts (10000 ms or 10 seconds)

DistributedMatchEngine.MatchingEngine.MatchingEngine
MatchingEngine(CarrierInfo carrierInfo=null, NetInterface netInterface=null, UniqueID uniqueID=null, DeviceInfo deviceInfo=null)
Definition: DistributedMatchEngine.cs:243