301 posts
Location
Whenever, Wherever!
Posted 13 July 2014 - 11:15 PM
EnderCC is a HTTP framework. It's easy to use and you don't have to setup your own server!
Download:
pastebin get V91n5SXC ender
Usage in a lua prompt:
On one computer:
os.loadAPI("ender")
ender.connect("testchannel")
-- Send message on other computer
ender.receive("testchannel")
On the other:
os.loadAPI("ender")
ender.send("testchannel", "Hello!"))
ender.getName("testchannel") -- The computers name that appears to other clients
Edited on 17 March 2015 - 04:15 PM
99 posts
Location
Louisville, Kentucky
Posted 14 July 2014 - 07:09 PM
Isn't this basically the modem API?
656 posts
Posted 14 July 2014 - 09:51 PM
It's meant to be like the modem API, but it is via http, vis an external server. It has infinite range and works between dimensions and even servers. (at least that's what I think)
Edited on 14 July 2014 - 07:53 PM
99 posts
Location
Louisville, Kentucky
Posted 15 July 2014 - 02:53 PM
Ow nice! Yea, I kinda missed the HTTP part. Lack of sleep is getting to me!
301 posts
Location
Whenever, Wherever!
Posted 16 July 2014 - 01:22 AM
Yes, it's designed for cross world and server communication.
673 posts
Posted 18 July 2014 - 01:31 AM
So is this your way of making that email between servers you mentioned on irresponsiblecraft?
42 posts
Posted 23 July 2014 - 08:56 AM
Whenever I try to use this API, I always get an error on line 113.
I'm trying to use the examples provided.
301 posts
Location
Whenever, Wherever!
Posted 29 July 2014 - 12:10 AM
That's odd. What is the error? Line 113 is just an http.get. Do you have HTTP enabled?
42 posts
Posted 29 July 2014 - 03:37 AM
I have HTTP enabled. I believe the error I receive is a "index nil value" error
301 posts
Location
Whenever, Wherever!
Posted 08 August 2014 - 05:01 PM
Are you sure you have http on? Try typing http.get("
http://fluidnode.com/ping") into a lua console.
If that works, are you using the latest version?
463 posts
Location
Germany
Posted 31 August 2014 - 04:48 PM
It seems you need to pass an argument to ender.receive, otherwise ender.connect (which is called by ender.receive) searches for nil in the connected channels list, which isn't there, so it calls rawStart to connect to 'nil'. rawStart calls http.get with a string concatenated with the channel which is nil, and baam, "attempt to concatenate string and nil"
Then, line 179,
chans[channel] --# needs to be:
chans[channel][1]
Sending doesn't work serverside, if I try to send "hey" in a browser, it errors:
TypeError: Object #<Object> has no method 'forEach'
at /var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/app/views/EnderCC.js:32:12
at Layer.handle [as handle_request] (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/layer.js:76:5)
at next (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/route.js:100:13)
at Route.dispatch (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/route.js:81:3)
at Layer.handle [as handle_request] (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/layer.js:76:5)
at /var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/index.js:227:24
at Function.proto.process_params (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/index.js:305:12)
at /var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/index.js:221:12
at Function.match_layer (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/index.js:288:3)
at next (/var/lib/openshift/53a07cf1500446c6e3000183/app-root/runtime/repo/node_modules/express/lib/router/index.js:182:10)
I love the idea, and I'd love to see this in action :)/>
Edited on 31 August 2014 - 02:51 PM
173 posts
Location
The hall of 1000 monkeys and only 1 typewriter
Posted 17 August 2016 - 05:37 PM
How do I use the API to send strings? I'm currently trying to make a cross server chat for my OS (you will be credited) and when I tried pasting the message on the screen of the receiving end, it came up with "truetest" and then a bunch of characters and numbers. It looks as though it's been encrypted :P/> how do I convert it back?