Forum > Networking and Web Programming
Easiest way to send UDP packets
marcov:
I just use Indy. Back then ICS was the only one with non-VCL demos, but then they decided to put SSL behind a paywall and I converted to Indy10.
Thaddy:
I never use components for that, I use either fcl-net or synapse.
Warfley's code looks interesting, but I can't get it to work. (probably impatience on my side)
MarkMLl:
I don't like getting involved with this since I'm a unix rather than Windows user, but for the specific case of UDP I'd agree with Warfley and suggest the standard Sockets unit.
I would not give that advice if a connection-oriented protocol which could benefit from SSL were involved, or for a higher-level protocol such as DNS lookups or HTTP.
I'd specifically suggest avoiding the LNet library, since my experience is that debugging it when it goes wrong is an utter so^Hwine.
MarkMLl
Thaddy:
I agree with your lnet remark, but your examples do not work and I am on linux too.
I am sure it is just a misunderstanding on my side.
MarkMLl:
--- Quote from: Thaddy on May 28, 2024, 11:43:12 am ---I agree with your lnet remark, but your examples do not work and I am on linux too.
I am sure it is just a misunderstanding on my side.
--- End quote ---
Correct. You didn't check who'd provided the example.
I've just checked and I don't have anything convenient to hand, i.e. with socket creation and message sending next to each other. However one of the advantages of using the traditional sockets unit is that it is basically the standard Berkeley API (of which Winsock is a derivative), so as well as the documentation at https://www.freepascal.org/docs-html/current/rtl/sockets/index.html being relevant there is a vast amount of information floating around the Internet: detailed description of the various socket options and so on.
As soon as you move away from the standard API, you risk cutting yourself off from the associated doctrine and accumulated knowledge. And that applies to both using clever components or libraries, and to using books like Comer & Stevens which try to embellish the standard routines.
MarkMLl
Navigation
[0] Message Index
[#] Next page
[*] Previous page