Network API
(02-20-2015, 08:37 AM)xoft Wrote: 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

You should implement this into core
Reply
Thanks given by:
I disagree. Keep it in a separate plugin. Vanilla servers aren't shown automatically either.
Reply
Thanks given by:
(02-20-2015, 08:37 AM)xoft Wrote: 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)

Wow, sounds and looks awesome. Sorry I said I'd try to help and ended up doing nothing xD >.< But I'll see what I can do about a query plugin, school just really picked up suddenly

Edit: Got this working https://github.com/Raekye/MCServer-Query.../Query.lua , as per http://wiki.vg/Query
Reply
Thanks given by:
Small question about the Network API.
Can I also leave the Port parameter empty and put it in the host?
For example: "cNetwork:Connect('ftp://myhost.org:21', nil, Callbacks)"
Reply
Thanks given by:
No, that won't work, the Host param is already too overloaded and the parser would be needlessly complicated. Also, the "ftp://" prefix shouldn't go there either.
Reply
Thanks given by: NiLSPACE
Ah okay. I was investigating if we could maybe connect to an mysql server through the network API instead of a library, and the only clue I found was this
Reply
Thanks given by:
That would be possible, but impractical - the network API is async, but you want the SQL database to by synchronous. Not to mention that the entire communication protocol would need to be ported. Too much work. Using an ODBC connector seems like a much better way to do this.
Reply
Thanks given by:
Is it maybe possible that the network connection doesn't release the memory properly? I noticed for a while that RAM doesn't go down when nobody is online, and it sometimes even goes up. When it goes up I pretty much always had the Core's webchat tab open, and since that tab keeps connecting to the server every X seconds (and thus creating a new connection), I thought it could be possible that the network could be the problem. I notice this on both Linux (gallery server) and Windows (local).
Reply
Thanks given by:
Anyone know how I can connect to a https website? I tried this:
a_Link:StartTLSClient("", "", "")
local ConnectionString = "GET /mc-server/WorldEdit/master/Info.lua HTTP/1.1\r\nHost: raw.githubusercontent.com\r\nConnection: keep-alive\r\n\r\n"
a_Link:Send(ConnectionString)

But I don't get any data in return when I do that.
Reply
Thanks given by:
Isn't "Content-length" required when using keep-alive connections? Or try using a non-keep-alive connection, possibly even HTTP/1.0, just to see if you get any data at all.
Reply
Thanks given by:




Users browsing this thread: 6 Guest(s)