Hello Brian,

Not tested. This echo back a received packet from a listening UDP socket
to the other end:

var
   Buffer: array [0..1023] of char;
   Len: integer;
   Src: TSockAddrIn;
   SrcLen: integer;
begin
   SrcLen := SizeOf(Src);
   Len  := FUDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
   if Len < 0 then
      Exit;
   Buffer[Len] := #0;
   
   // Echo packet back
   FUDPServer.SendTo(Src, SizeOf(Src), Buffer, Len);
   

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to