
https://github.com/P-T-/HTTPNet
This is a functional CC API and server (not CC) that allows for instant communication over http using socket sorcery to handle requests
the server is completely written in Lua and requires just LuaSocket to function
Linux/Mac: try "apt-get install luarocks" if not then get it from http://www.luarocks.org/en/Download then do "luarocks install luasocket"
Windows: https://code.google..../luaforwindows/ has everything you need
if someone wants to attempt to make this in php please do, because people say it would be easier though from what i can tell by how php works this would be hard to do
Media:
_______________________________________________________________________________________________________________________________________________________________________________
(embed was derping)
Documentation:
_______________________________________________________________________________________________________________________________________________________________________________
local h=httpnet.new([host[,port[,id]]])host is the IP of the server, defaults to "localhost"
port is the port, defaults to 1337
id is used in :send, it will also open the channel
event httpnet_message h.uid channel returnchannel datalike modem_message, see h.uid below
h:open(...)will open all channels specified
h:close(...)will close all channels specified
h:close()will close all channels
h:transmit(chan,reurnchan,data)like modem.transmit
h:send(chan,data)will send data to chan, using the id specified in .new as the returnchan
h:get([timeout])waits for the "httpnet_message" event and returns it
h.isOpen[chan]tells you if chan is open, do not set directly, use :close and :open
h.uida secret random hex string, use to filter events
h:exit()do this after you are done
h:loadplugin(path,...)loads a plugin
Plugins
Bugs:
_______________________________________________________________________________________________________________________________________________________________________________
- no known bugs
TODO:
_______________________________________________________________________________________________________________________________________________________________________________
- DOS protection on server
- uid collision detection (currently a 1 in 18446744073709551616 chance so isnt much of a problem)
- auto updater
- more config options on server
- more client functions
- get contributors on github
Credits:
_______________________________________________________________________________________________________________________________________________________________________________
me - everything
if you are having trouble, try contacting me on #pixel before posting here
Edited by PixelToast, 07 August 2016 - 06:19 PM.


This topic is locked













