sockcli.pp 1.1 KB

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