Cuberite Forum
Network API - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Network API (/thread-1700.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


RE: Network API - NiLSPACE - 02-16-2015

I uploaded my code to Github: https://github.com/NiLSPACE/MC-Web-Server


RE: Network API - NiLSPACE - 02-16-2015

I even got a stacktrace working:
[Image: 1e393f8867.png]


RE: Network API - bearbin - 02-16-2015

Cool!


RE: Network API - jan64 - 02-16-2015

Nice. This could be used by plugins like DynMap, or even for small server websites.


RE: Network API - xoft - 02-16-2015

Actually, this functionality is expected to go right into WebAdmin. One of these days... Smile


RE: Network API - sphinxc0re - 02-16-2015

Hurray!


RE: Network API - NiLSPACE - 02-16-2015

Aww. So my plugin is pretty useless?


RE: Network API - xoft - 02-16-2015

Anything that lets you learn while enjoying it is, by definition, not useless. And you brought in an interesting new approach, integrating Lua code into HTML, instead of the other way around - it might be good to investigate this a bit more.


RE: Network API - xoft - 02-19-2015

Why can't things be easy?

Turns out that IPv6 dualstack sockets are hell on earth. Currently ran into an issue concerning sending UDP datagrams. In order to send a UDP datagram, the program needs to supply the "destination" parameter to the OS API function. On some OSes (Linux), the API function accepts IPv4 addresses for IPv6-dualstack sockets, on others (BSD, Windows) it does not. Real PITA.

Other than that, I think the UDP framework is almost complete, the bindings to Lua are already working (as much as I could test without sending or receiving anything Wink ) so I expect to have a PR submitted by tomorrow.


RE: Network API - xoft - 02-20-2015

I've got UDP working quite nicely, I even wrote a simple plugin that broadcasts the server's existence on LAN (so that vanilla client sees the local servers automatically without the need to add them - http://wiki.vg/Lan_Worlds)

Now I just need to make it compile under Linux, there are so many minor incompatibilities in there! Functions taking size_t instead of int params, etc.


Plugin's here: https://github.com/madmaxoft/LANBroadcaster