Jens Geyer | 8a70196 | 2013-03-25 01:28:12 +0200 | [diff] [blame] | 1 | (* |
| 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 | |
| 20 | program Multiplex.Test.Server; |
| 21 | |
| 22 | {$APPTYPE CONSOLE} |
| 23 | |
| 24 | uses |
Jens Geyer | d5436f5 | 2014-10-03 19:50:38 +0200 | [diff] [blame] | 25 | SysUtils, |
| 26 | Multiplex.Server.Main in 'Multiplex.Server.Main.pas', |
| 27 | Thrift in '..\..\src\Thrift.pas', |
Jens Geyer | bea9bbe | 2016-04-20 00:02:40 +0200 | [diff] [blame] | 28 | Thrift.Socket in '..\..\src\Thrift.Socket.pas', |
Jens Geyer | d5436f5 | 2014-10-03 19:50:38 +0200 | [diff] [blame] | 29 | Thrift.Transport in '..\..\src\Thrift.Transport.pas', |
| 30 | Thrift.Transport.Pipes in '..\..\src\Thrift.Transport.Pipes.pas', |
| 31 | Thrift.Protocol in '..\..\src\Thrift.Protocol.pas', |
| 32 | Thrift.Protocol.Multiplex in '..\..\src\Thrift.Protocol.Multiplex.pas', |
| 33 | Thrift.Processor.Multiplex in '..\..\src\Thrift.Processor.Multiplex.pas', |
| 34 | Thrift.Collections in '..\..\src\Thrift.Collections.pas', |
| 35 | Thrift.Server in '..\..\src\Thrift.Server.pas', |
| 36 | Thrift.Console in '..\..\src\Thrift.Console.pas', |
| 37 | Thrift.Utils in '..\..\src\Thrift.Utils.pas', |
Jens Geyer | eab29a0 | 2014-11-09 23:32:50 +0100 | [diff] [blame] | 38 | Thrift.TypeRegistry in '..\..\src\Thrift.TypeRegistry.pas', |
Jens Geyer | d5436f5 | 2014-10-03 19:50:38 +0200 | [diff] [blame] | 39 | Thrift.Stream in '..\..\src\Thrift.Stream.pas'; |
| 40 | |
Jens Geyer | 8a70196 | 2013-03-25 01:28:12 +0200 | [diff] [blame] | 41 | var |
| 42 | nParamCount : Integer; |
| 43 | args : array of string; |
| 44 | i : Integer; |
| 45 | arg : string; |
| 46 | s : string; |
| 47 | |
| 48 | begin |
| 49 | try |
| 50 | Writeln( 'Multiplex TestServer '+Thrift.Version); |
| 51 | nParamCount := ParamCount; |
| 52 | SetLength( args, nParamCount); |
| 53 | for i := 1 to nParamCount do |
| 54 | begin |
| 55 | arg := ParamStr( i ); |
| 56 | args[i-1] := arg; |
| 57 | end; |
| 58 | TTestServer.Execute( args ); |
| 59 | Writeln('Press ENTER to close ... '); Readln; |
| 60 | except |
| 61 | on E: Exception do |
| 62 | Writeln(E.ClassName, ': ', E.Message); |
| 63 | end; |
| 64 | end. |
| 65 | |
| 66 | |
| 67 | |