1Program Client; 2{ 3 This file is part of the Free Component Library (FCL) 4 Copyright (c) 1999-2000 by the Free Pascal development team 5 6 See the file COPYING.FPC, included in this distribution, 7 for details about the copyright. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 **********************************************************************} 14 15{ 16 TInetSocket client program. Before running this, run either 17 'isocksvr' or 'dsocksvr -i' in another terminal or in the 18 background. 19} 20{$mode objfpc}{$H+} 21uses ssockets; 22 23Const 24 TheHost = 'localhost'; 25 ThePort = 4100; 26 27var 28 S : String; 29 i : longint; 30 31begin 32 S:='This is a textstring sent by the client'#10; 33 With TInetSocket.Create(TheHost,ThePort) do 34 begin 35 For I:=1 to 10 do 36 Write(S[1],Length(S)); 37 S:='QUIT'#10; 38 Write(S[1],Length(S)); 39 Free; 40 end; 41end. 42