Network API
Hi, I'm gonna try to draft an API for UDP support. I think the last related discussion here was on page 6

(01-14-2015, 11:12 PM)xoft Wrote: The code can't be split without exposing cNetworkSingleton - most of the implementation relies on its internals. And I don't want to expose it, since it has libevent stuff in it, so we'd need to put libevent dependencies in the header.

I don't think the Network stuff is gonna grow much more. It's pretty much complete on the TCP side, and the UDP side can have a separate file of its own - after all, libevent doesn't have such a high level support for it anyway.

Any updates/pointers on what I should do? Otherwise I'll get back when I have something working and ask for feedback (probably will need a lot of changesTongue )
Reply
Thanks given by:
I think a better course of actions would be to try to describe the API first - what would the functions be, what names and params for the callbacks etc. You don't want to end up rewriting the thing three times over Smile
Reply
Thanks given by:
Makes sense, I'll get back hopefully soon when I get a chance to look and think through it carefully (test tomorrow)Big Grin

Update: been really busy this week. Hopefully will get some progress and results next week
Reply
Thanks given by:
Tell me what you think about the cNetwork et al Lua API documentation, is it sufficient?
http://mc-server.xoft.cz/LuaAPI/cNetwork.html
Reply
Thanks given by:
(02-08-2015, 03:05 AM)xoft Wrote: Tell me what you think about the cNetwork et al Lua API documentation, is it sufficient?
http://mc-server.xoft.cz/LuaAPI/cNetwork.html

I miss a byte buffer Sad
I need to read var ints / shorts / ...
Reply
Thanks given by:
What do you need VarInts for? I can understand the fixed length types but VarInts seemed like a Minecraft specific encoding. Lack of helpers for buffering and reading values is an issue. I can agree that exposing the non-Minecraft protocol spercific parts of cByteBuffer is probably now a good idea.
Reply
Thanks given by:
(02-08-2015, 04:17 AM)worktycho Wrote: What do you need VarInts for? I can understand the fixed length types but VarInts seemed like a Minecraft specific encoding. Lack of helpers for buffering and reading values is an issue. I can agree that exposing the non-Minecraft protocol spercific parts of cByteBuffer is probably now a good idea.

I will ping a minecraft server.
Reply
Thanks given by:
Network API can do a client TLS on a TCP link now: cTCPLink:StartTLSClient()
Reply
Thanks given by:
So what's our first network plugin going to be? Smile I was looking into hooking into Cleverbot, but I didn't find an API.
Reply
Thanks given by:
The first network plugin is already present at the base repo - the NetworkTest plugin Smile
But yes, it's not something anyone would want to install on their server, so let's ask about the first "useful" plugin instead.
Reply
Thanks given by:




Users browsing this thread: 11 Guest(s)