| 
		
	
	
	
		
	Posts: 5 
	Threads: 1 
	Joined: Feb 2012
	
 Thanks: 0Given 0 thank(s) in 0 post(s)
 
 
	
	
		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
 
	
	
	
		
	Posts: 6,482 
	Threads: 176 
	Joined: Jan 2012
	
 Thanks: 131Given 1085 thank(s) in 857 post(s)
 
 
	
	
		The socket framework is not accessible from the plugins, though it may become. Can you elaborate on what API you'd like to have?
	 
	
	
	
		
	Posts: 4,637 
	Threads: 115 
	Joined: Dec 2011
	
 Thanks: 697Given 518 thank(s) in 441 post(s)
 
 
	
	
		 (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 redstone   
And i am pretty good in it :p
	 
	
	
	
		
	Posts: 5 
	Threads: 1 
	Joined: Feb 2012
	
 Thanks: 0Given 0 thank(s) in 0 post(s)
 
 
	
	
		 (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!
	 
	
	
	
		
	Posts: 1,450 
	Threads: 53 
	Joined: Feb 2011
	
 Thanks: 15Given 130 thank(s) in 99 post(s)
 
 
	
		
		
		02-24-2012, 09:02 PM 
(This post was last modified: 02-24-2012, 09:11 PM by FakeTruth.)
		
	 
		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
	 
	
	
	
		
	Posts: 6,482 
	Threads: 176 
	Joined: Jan 2012
	
 Thanks: 131Given 1085 thank(s) in 857 post(s)
 
 
	
	
		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.
	 
	
	
	
		
	Posts: 5 
	Threads: 1 
	Joined: Feb 2012
	
 Thanks: 0Given 0 thank(s) in 0 post(s)
 
 
	
	
		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?
 
	
	
	
		
	Posts: 1,450 
	Threads: 53 
	Joined: Feb 2011
	
 Thanks: 15Given 130 thank(s) in 99 post(s)
 
 
	
	
		 (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
	 
	
	
	
		
	Posts: 5 
	Threads: 1 
	Joined: Feb 2012
	
 Thanks: 0Given 0 thank(s) in 0 post(s)
 
 
	
	
		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?
 |