static void Main(string[] args) { ForwardingResource coap2coap = new ProxyCoapClientResource("coap2coap"); ForwardingResource coap2http = new ProxyHttpClientResource("coap2http"); // Create CoAP Server on PORT with proxy resources form CoAP to CoAP and HTTP CoapServer coapServer = new CoapServer(CoapConfig.Default.DefaultPort); coapServer.Add(coap2coap); coapServer.Add(coap2http); coapServer.Add(new TargetResource("target")); coapServer.Start(); ProxyHttpServer httpServer = new ProxyHttpServer(CoapConfig.Default.HttpPort); httpServer.ProxyCoapResolver = new DirectProxyCoAPResolver(coap2coap); Console.WriteLine("Press any key to exit."); Console.ReadKey(); }
public ProxyEndPoint(ProxyHttpServer server) { _server = server; }
public ProxyExchange(ProxyHttpServer server, Request request) : base(request, Origin.Remote) { _server = server; _request = request; }