require
#11
(01-20-2014, 12:14 AM)xoft Wrote: Is there anything in particular in LFS that you think the cFile API doesn't provide? I'd like to think that we already cover that one in MCS.
No I think cFile does enough.

Quote:LuaSocket is a natural choice; however it doesn't play too well with MCS architecture, because it uses blocking IO, and MCS plugins cannot afford to block - they'd block the entire server. We need to implement our own socket library, built on asynchronous events.
Yea I've noticed that. I created a small webserver in MCServer and I coudn't connect to the server anymore, but if I already was connected and then started the webserver I didn't disconnect and could do everything.

Quote:something like this:
Yea that looks realy easy to use.

Quote:As for threading, I was considering various alternatives, this one looks really good, we can make a similar interface in MCS. Instead of giving it a string of code to run, though, I would prefer giving it an entire disk file, how about that?
That looks an easier, more manageable option then giving it a string.

Quote:Of course, the child thread won't have access to most MCS API, I think only the cFile API is safe enough, maybe cBlockArea (but without cWorld). It will be possible to "TryJoin" a thread that will join the thread if it has ended or return no value if the thread is still running.
Yea I've noticed that too Sad I tried creating a thread where it creates a hook and sends a player a message when he's flying but cPluginManager was a nil value.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)