A free net library for UDP protocol? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Wodzu · 2013-01-12 09:44 Hi guys. I am thinking about writing a mutiplayer game. I am looking for a lightweight library which allows server-client communication under Windows via UDP. I am interested in a free library for non-commercial usage. Could you reccomend me something? Thanks. ---------------------------------------------------------------------- Chronos · 2013-01-12 09:56 There are list of available libraries: http://wiki.freepascal.org/Networking_libraries Other information related to networking: http://wiki.freepascal.org/Networking I would suggest something like simple TUDPSocket which exists in Delphi VCL but not exist in LCL. So you can better start with Synapse UDP sockets: http://wiki.freepascal.org/Synapse ---------------------------------------------------------------------- Wodzu · 2013-01-12 11:25 Thanks. I don't know how I should do this. Should I in my game loop send all data to the clients in a synchronous way or asynchronous. If I will send data synchronously then I will stale my game loop for some time but I will have the knowledge about the funtion result. If I send data asynchronously my game loop will be not stopped but I would not know what happened with the data? But I suppose there will be a callback function as a parameter which will be fired up when asynchronous call finishes? ---------------------------------------------------------------------- rasberryrabbit · 2013-01-12 12:46 Long time ago, I translate enet library to pascal. http://enet.bespin.org/index.html ---------------------------------------------------------------------- Dibo · 2013-01-12 13:25 LNet also has UDP components and it is async (you don't need threading) http://lnet.wordpress.com/ ---------------------------------------------------------------------- Wodzu · 2013-01-12 16:06 Thanks guys. I think LNet might be what I am looking for. @parcel,  where I can find the translated headers for ENet? if you care to share them of course:) ---------------------------------------------------------------------- rasberryrabbit · 2013-01-16 06:36 Quote from: Wodzu on January 12, 2013, 05:06:05 pm@parcel,  where I can find the translated headers for ENet? if you care to share them of course:) There is a some tutorials  http://enet.bespin.org/Tutorial.html My Pascal translation is same way to using ENet C library. but there is a winsock.pas dependency. p.s.  I am updating ENet 1.3.6 to freepascal. It takes some time. ---------------------------------------------------------------------- rasberryrabbit · 2013-01-19 15:08 ENet 1.3.6 initial translation to fpc. it lacks linux implementaion. (p.s.) I fix some mistakes and simple example.