예제 #1
0
 public GStoreServicesImpl(ServerDomain store, ServerManager man, int minDelay, int maxDelay)
 {
     this.store    = store;
     this.man      = man;
     this.minDelay = minDelay;
     this.maxDelay = maxDelay;
 }
예제 #2
0
        static void Main()
        {
            // Enable Support For Unencrypted HTTP2
            AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
            ParseArgs();

            var hp    = Lib.ParseURL(URL);
            var store = new ServerDomain();

            Grpc.Core.Server server = new Grpc.Core.Server {
                Services =
                {
                    GStoreServices.BindService(new GStoreServicesImpl(store,   man, minDelay, maxDelay)),
                    GStoreSync.BindService(new GStoreSyncImpl(store,           man, minDelay, maxDelay)),
                    PupSyncServices.BindService(new PupSyncServicesImpl(store, man))
                },
                Ports = { new ServerPort(hp[0], Convert.ToInt16(hp[1]), ServerCredentials.Insecure) }
            };
            server.Start();
            Lib.Block(URL);
        }
예제 #3
0
 public PupSyncServicesImpl(ServerDomain store, ServerManager man)
 {
     this.store = store;
     this.man   = man;
 }