Example #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="serverPort">Port to start server on</param>
 internal HttpInterfaceManager(int serverPort)
 {
     sendMsg       = true;
     helper        = new WebHelper();
     listener      = new StreamSocketListener();
     lp            = new LocationProvider();
     hc            = new HubController(lp, this);
     htmlPages     = new Dictionary <string, string>();
     originalPages = new Dictionary <string, string>();
     port          = serverPort;
     listener.ConnectionReceived += (s, e) =>
     {
         try
         {
             // Process incoming request
             processRequestAsync(e.Socket);
         }
         catch (Exception ex)
         {
             Debug.WriteLine("Exception in StreamSocketListener.ConnectionReceived(): " + ex.Message);
         }
     };
 }
Example #2
0
 public AzureIoTHub(HubController hub)
 {
     hc = hub;
 }