public RpcServerProxy(Uri targetHost, int?proxyServerPort = null, IPAddress address = null) { _proxyClient = JsonRpcClient.Create(targetHost, ArbitraryDefaults.DEFAULT_GAS_LIMIT, ArbitraryDefaults.DEFAULT_GAS_PRICE); _httpServer = new JsonRpcHttpServer(_proxyClient, ConfigureWebHost, proxyServerPort, address); //var undefinedRpcMethods = this.GetUndefinedRpcMethods(); //Console.WriteLine("Warning: following RPC methods are not defined: \n" + string.Join(", ", undefinedRpcMethods.Select(r => r.Value()))); }
public async Task SetupTeardown() { var httpServer = new JsonRpcHttpServer(new MockRpcController()); await httpServer.StartAsync(); await Task.Delay(100); await httpServer.StopAsync(); httpServer.Dispose(); }
public Server(CancellationToken cancel = default) : base(cancel) { try { this.SingleInstance = new SingleInstance("Cores.Basic.App.DaemonCenter"); // データベース this.HiveData = new HiveData <DbHive>(Hive.SharedLocalConfigHive, "DaemonCenterServer/Database", getDefaultDataFunc: () => new DbHive(), policy: HiveSyncPolicy.AutoReadWriteFile, serializer: HiveSerializerSelection.RichJson); this.JsonRpcServer = new JsonRpcHttpServer(this); } catch { this._DisposeSafe(); throw; } }
public MockServerApp(int?port = null) { RpcServer = new JsonRpcHttpServer(this, ConfigureWebHost, port); }