Is there a serverside socket library?
#1
Heya,

Just downloaded/compiled/ran MCServer on my Linux box, works great, only crashes if I mess with redstone, but hey, I don't mind. I suck at redstone mechanics anyway.

I do have a question about socket libraries for this software: Are there any I can use in a plugin? If so, can I open a socket and connect to something with the library?

Thanks for the help!

-AA200
Reply
Thanks given by:
#2
The socket framework is not accessible from the plugins, though it may become. Can you elaborate on what API you'd like to have?
Reply
Thanks given by:
#3
(02-19-2012, 09:45 AM)ArghArgh200 Wrote: Heya,

Just downloaded/compiled/ran MCServer on my Linux box, works great, only crashes if I mess with redstone, but hey, I don't mind. I suck at redstone mechanics anyway.

I do have a question about socket libraries for this software: Are there any I can use in a plugin? If so, can I open a socket and connect to something with the library?

Thanks for the help!

-AA200

But i love redstoneBig Grin
And i am pretty good in it :p

Reply
Thanks given by:
#4
(02-20-2012, 06:52 PM)xoft Wrote: The socket framework is not accessible from the plugins, though it may become. Can you elaborate on what API you'd like to have?

I just need the ability to split strings using a delimiter, open, read, close, and listen on sockets (last one optional) so that I can create an IRC relay link thing, I already have one for my Garry's Mod server I can easily adapt. Also, what version of Lua does this software use?

Thanks!
Reply
Thanks given by:
#5
MCServer uses Lua 5.1.4 unmodified. Maybe we should update to 5.2

I think I'm gonna install this http://w3.impa.br/~diego/software/luasocket/home.html instead of writing our own socket library for Lua. It seems to only have blocking sockets though, so this might not be optimal.. hmm
Reply
Thanks given by:
#6
I'd prefer if the Lua socket interface could use our cSocketThreads class, since it's much beter suited at server usage. That would mean, however, that someone would need to write a Lua wrapper class and that the interface would need to be callback-based, at least in the receiving direction.
Reply
Thanks given by:
#7
Lua 5.1.4 is what my Garry's Mod IRC link thing uses, so it'd probably be less of a hassle for me to jump versions and make sure that everything I use in it didn't break/explode/annihilate an innocent family in 5.2

Do you think I can just take the libraries from there and put them in the same directory?
Reply
Thanks given by:
#8
(02-25-2012, 12:21 AM)xoft Wrote: I'd prefer if the Lua socket interface could use our cSocketThreads class, since it's much beter suited at server usage. That would mean, however, that someone would need to write a Lua wrapper class and that the interface would need to be callback-based, at least in the receiving direction.
True, but I saw that LuaSockets has support for easy HTTP, FTP and more stuff which I thought might be cool.

(02-25-2012, 03:26 AM)ArghArgh200 Wrote: Lua 5.1.4 is what my Garry's Mod IRC link thing uses, so it'd probably be less of a hassle for me to jump versions and make sure that everything I use in it didn't break/explode/annihilate an innocent family in 5.2

Do you think I can just take the libraries from there and put them in the same directory?
I don't know, I've never tried using external libraries in Lua but if I'd take a guess I think it'll work
Reply
Thanks given by:
#9
Well, I tried it out, no luck.
I've got to go fix a few other things now, my GMod server appears to be broken again. <_<
Do you have an IRC channel that I could lurk in perchance?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)