예제 #1
0
파일: Program.cs 프로젝트: TimotejRybar/sdb
        static void Main(string[] args)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));

            var dataSource = new CacheDataService(new MySQLDataService());
            //var dataSource = new MemoryDataService();

            var server = new EncryptedTcpServer(storeKeysInConfiguration: true);

            server.AllowAll = true;

            var auth = new TcpBasicAuthenticationProvider(dataSource);

            auth.AutoRegisterUsers = true;
            auth.RegisterHandlersTo(server);

            var serviceServer = new TcpDataServiceServer(dataSource);

            serviceServer.RegisterTo(server);
            serviceServer.RegisterAuthProvider(auth);

            Console.ReadLine();

            server.Dispose();
            dataSource.Dispose();
        }
예제 #2
0
파일: Program.cs 프로젝트: SorenHK/sdb
        static void Main(string[] args)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));

            DataServiceBase service = new TcpDataService(new TcpClient("home.sorenhk.dk"));
            service = new CacheDataService(service);

            var tcpServer = new TcpServer();

            var server = new TcpDataServiceServer(service);
            server.RegisterTo(tcpServer);

            Console.ReadLine();

            tcpServer.Dispose();
            service.Dispose();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));

            DataServiceBase service = new TcpDataService(new TcpClient("home.sorenhk.dk"));

            service = new CacheDataService(service);

            var tcpServer = new TcpServer();

            var server = new TcpDataServiceServer(service);

            server.RegisterTo(tcpServer);

            Console.ReadLine();

            tcpServer.Dispose();
            service.Dispose();
        }
예제 #4
0
파일: Program.cs 프로젝트: SorenHK/sdb
        static void Main(string[] args)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));

            var dataSource = new CacheDataService(new MySQLDataService());
            //var dataSource = new MemoryDataService();

            var server = new EncryptedTcpServer(storeKeysInConfiguration: true);
            server.AllowAll = true;

            var auth = new TcpBasicAuthenticationProvider(dataSource);
            auth.AutoRegisterUsers = true;
            auth.RegisterHandlersTo(server);

            var serviceServer = new TcpDataServiceServer(dataSource);
            serviceServer.RegisterTo(server);
            serviceServer.RegisterAuthProvider(auth);

            Console.ReadLine();

            server.Dispose();
            dataSource.Dispose();
        }