Thank you very much Ludo!
This works as expected,
my error - i assumed Synapse needs separate sockets for Send and Receive,
there was some example for udp broadcast like this.
Best regards,
Dmitri
On Sat, Mar 10, 2012 at 3:47 PM, Ludo Brands <ludo.bra...@free.fr> wrote:
> **
>
>
> Here http://bansky.net/echotool/
> i found command line application that does exactly what i want, written in
> C#, sure the same could be done in Delphi.
> What?
>
> I don't understand why you use 2 sockets. When you send a message you
> receive the reply on the same socket.
>
> Change your code to the following and you can connect to an echo server
> (code on http://www.ararat.cz/synapse/doku.php/public:howto:udpserver )
>
> procedure TForm1.UniCastTest;
> var
> sock: TUDPBlockSocket;
> buf: string;
> begin
> sock := TUDPBlockSocket.Create;
> try
> sock.connect('192.168.2.105','9005');
> if sock.LastError <> 0 then exit;
>
> sock.SendString(edStr.Text);
>
> buf := sock.RecvPacket(3000);
>
> Memo1.Lines.Add('>' + buf + '<');
>
> sock.CloseSocket;
> finally
> sock.free;
> end;
> end; // UniCastTest
> Change server IP and port to your liking.
>
> Ludo
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> synalist-public mailing list
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public
>
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public