コード例 #1
0
ファイル: Program.cs プロジェクト: rlusian1/CoAP.NET
        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();
        }
コード例 #2
0
 public ProxyEndPoint(ProxyHttpServer server)
 {
     _server = server;
 }
コード例 #3
0
ファイル: ProxyHttpServer.cs プロジェクト: rlusian1/CoAP.NET
 public ProxyEndPoint(ProxyHttpServer server)
 {
     _server = server;
 }
コード例 #4
0
ファイル: ProxyHttpServer.cs プロジェクト: zpfcaca/CoAP.NET
 public ProxyExchange(ProxyHttpServer server, Request request)
     : base(request, Origin.Remote)
 {
     _server  = server;
     _request = request;
 }
コード例 #5
0
ファイル: ProxyHttpServer.cs プロジェクト: vjine/CoAP.NET
 public ProxyExchange(ProxyHttpServer server, Request request)
     : base(request, Origin.Remote)
 {
     _server = server;
     _request = request;
 }