/// <summary> /// Constructor /// </summary> /// <param name="serverPort">Port to start server on</param> internal HttpInterfaceManager(int serverPort) { sendMsg = true; helper = new WebHelper(); listener = new StreamSocketListener(); msgHub = new AzureIoTHub(); lp = new LocationProvider(); 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); } }; }
public HubController(LocationProvider loc, HttpInterfaceManager server) { view = server; lp = loc; msgHub = new AzureIoTHub(this); }