IdUDPClient.pas 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. { $HDR$}
  2. {**********************************************************************}
  3. { Unit archived using Team Coherence }
  4. { Team Coherence is Copyright 2002 by Quality Software Components }
  5. { }
  6. { For further information / comments, visit our WEB site at }
  7. { http://www.TeamCoherence.com }
  8. {**********************************************************************}
  9. {}
  10. { $Log: 10409: IdUDPClient.pas
  11. {
  12. { Rev 1.0 2002.11.12 10:59:00 PM czhower
  13. }
  14. unit IdUDPClient;
  15. interface
  16. uses
  17. IdUDPBase;
  18. type
  19. //TODO: The send methods cause Host to be resolved each time
  20. // change this to cache the resolution locally.
  21. TIdUDPClient = class(TIdUDPBase)
  22. protected
  23. public
  24. procedure Send(AData: string); overload;
  25. procedure SendBuffer(var ABuffer; const AByteCount: integer); overload;
  26. published
  27. property Host: string read FHost write FHost;
  28. property Port: Integer read FPort write FPort;
  29. property ReceiveTimeout;
  30. end;
  31. implementation
  32. { TIdUDPClient }
  33. procedure TIdUDPClient.Send(AData: string);
  34. begin
  35. Send(Host, Port, AData);
  36. end;
  37. procedure TIdUDPClient.SendBuffer(var ABuffer; const AByteCount: integer);
  38. begin
  39. SendBuffer(Host, Port, ABuffer, AByteCount);
  40. end;
  41. end.