blob: c7a1a1992a8c47751151c9caab5424fa19818b68 [file] [log] [blame]
Jens Geyer8a701962013-03-25 01:28:12 +02001(*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *)
19
20program Multiplex.Test.Server;
21
22{$APPTYPE CONSOLE}
23
24uses
Jens Geyerd5436f52014-10-03 19:50:38 +020025 SysUtils,
26 Multiplex.Server.Main in 'Multiplex.Server.Main.pas',
27 Thrift in '..\..\src\Thrift.pas',
28 Thrift.Transport in '..\..\src\Thrift.Transport.pas',
29 Thrift.Transport.Pipes in '..\..\src\Thrift.Transport.Pipes.pas',
30 Thrift.Protocol in '..\..\src\Thrift.Protocol.pas',
31 Thrift.Protocol.Multiplex in '..\..\src\Thrift.Protocol.Multiplex.pas',
32 Thrift.Processor.Multiplex in '..\..\src\Thrift.Processor.Multiplex.pas',
33 Thrift.Collections in '..\..\src\Thrift.Collections.pas',
34 Thrift.Server in '..\..\src\Thrift.Server.pas',
35 Thrift.Console in '..\..\src\Thrift.Console.pas',
36 Thrift.Utils in '..\..\src\Thrift.Utils.pas',
Jens Geyereab29a02014-11-09 23:32:50 +010037 Thrift.TypeRegistry in '..\..\src\Thrift.TypeRegistry.pas',
Jens Geyerd5436f52014-10-03 19:50:38 +020038 Thrift.Stream in '..\..\src\Thrift.Stream.pas';
39
Jens Geyer8a701962013-03-25 01:28:12 +020040var
41 nParamCount : Integer;
42 args : array of string;
43 i : Integer;
44 arg : string;
45 s : string;
46
47begin
48 try
49 Writeln( 'Multiplex TestServer '+Thrift.Version);
50 nParamCount := ParamCount;
51 SetLength( args, nParamCount);
52 for i := 1 to nParamCount do
53 begin
54 arg := ParamStr( i );
55 args[i-1] := arg;
56 end;
57 TTestServer.Execute( args );
58 Writeln('Press ENTER to close ... '); Readln;
59 except
60 on E: Exception do
61 Writeln(E.ClassName, ': ', E.Message);
62 end;
63end.
64
65
66