changeset 275:340656b18b74

fix reactionary code git-svn-id: https://luan-java.googlecode.com/svn/trunk@276 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 19 Nov 2014 07:32:54 +0000
parents 8afe9f2fdfec
children e5a0dd95f3e7
files core/src/luan/modules/PickleServer.java core/src/luan/modules/Reactionary.luan
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
diff -r 8afe9f2fdfec -r 340656b18b74 core/src/luan/modules/PickleServer.java
--- a/core/src/luan/modules/PickleServer.java	Mon Nov 10 03:28:32 2014 +0000
+++ b/core/src/luan/modules/PickleServer.java	Wed Nov 19 07:32:54 2014 +0000
@@ -53,7 +53,7 @@
 	}
 
 	public void run() {
-		LuanTable io = (LuanTable)PackageLuan.loaded(con.luan).get("Io");
+		LuanTable io = (LuanTable)PackageLuan.loaded(con.luan).get("luan:Io");
 		LuanTable env = con.env;
 		Object old_reverse_pickle = io.get("reverse_pickle");
 		Object old_unreverse_pickle = env.get("_unreverse_pickle");
diff -r 8afe9f2fdfec -r 340656b18b74 core/src/luan/modules/Reactionary.luan
--- a/core/src/luan/modules/Reactionary.luan	Mon Nov 10 03:28:32 2014 +0000
+++ b/core/src/luan/modules/Reactionary.luan	Wed Nov 19 07:32:54 2014 +0000
@@ -1,25 +1,25 @@
 -- Reactionary
 
-import "Io"
+import "luan:Io"
 
-host = "localhost"
 port = 9101
+socket = "socket:localhost:" .. port
 
 function put_site(domain,password,dir)
-	local pc = Io.Socket(host,port).Pickle_client()
+	local pc = Io.Uri(socket).Pickle_client()
 	local pickle = pc.pickle
 	pc.call(%>
-		import "Reactionary"
+		import "luan:Reactionary"
 		Reactionary.do_put_site(<%=pickle(domain)%>,<%=pickle(password)%>,<%=pickle(dir)%>)
 	<%)
 	pc.close()
 end
 
 function delete_site(domain,password)
-	local pc = Io.Socket(host,port).Pickle_client()
+	local pc = Io.Uri(socket).Pickle_client()
 	local pickle = pc.pickle
 	pc.call(%>
-		import "Reactionary"
+		import "luan:Reactionary"
 		Reactionary.do_delete_site(<%=pickle(domain)%>,<%=pickle(password)%>)
 	<%)
 	pc.close()