/// <summary> /// Start the server /// </summary> private static void StartServer() { coapServer = new CoAPServerChannel(); coapServer.Initialize(null, 5683); coapServer.CoAPResponseReceived += new CoAPResponseReceivedHandler(OnCoAPResponseReceived); coapServer.CoAPRequestReceived += new CoAPRequestReceivedHandler(OnCoAPRequestReceived); coapServer.CoAPError += new CoAPErrorHandler(OnCoAPError); }
/// <summary> /// Start the server /// </summary> private static void StartServer() { coapServer = new CoAPServerChannel(); coapServer.Initialize(null, 5683); coapServer.CoAPResponseReceived += new CoAPResponseReceivedHandler(OnCoAPResponseReceived); coapServer.CoAPRequestReceived += new CoAPRequestReceivedHandler(OnCoAPRequestReceived); coapServer.CoAPError += new CoAPErrorHandler(OnCoAPError); //Add all the resources that this server allows observing coapServer.ObserversList.AddObservableResource(OBSERVED_RESOURCE_URI); }