[Lazarus] UDP server

duilio foschi octopushole at gmail.com
Mon Jan 11 20:32:52 CET 2021


http://www.ararat.cz/synapse/doku.php/public:howto:udpserver

this is the code suggested to write a UDP server with synapse.

The code uses an infinite loop in a thread. I find this solution rather
ugly.

I would expect an event OnReceiveData that apparently is not there.

The socket allows for a callback procedure of type

procedure OnStatus(Sender: TObject; Reason: THookSocketReason; const Value:
string);

However it seems that this callback only works when the command RecvPacket
or similar is issued and as far as the relative timeout does not elapse.

Do I understand well? There is now way to use an event to collect data in
synapse? An infinite loop is the only way?

I miss old ICS  (Internet Component Suite) :)

Thank you

Peppe Polpo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210111/125271e7/attachment.html>


More information about the lazarus mailing list