alright that should do it
This commit is contained in:
parent
14dec82611
commit
923227885e
93
net/audp.lua
93
net/audp.lua
@ -1,93 +0,0 @@
|
||||
require("net")
|
||||
function net:newUDPServer(port,servercode)
|
||||
local c={}
|
||||
c.hostip=net.getLocalIP()
|
||||
c.port=port
|
||||
c.bannedCIDs={}
|
||||
c.bannedIPs={}
|
||||
function c:setUpdateRate(n)
|
||||
self.updater:setSkip(n or 0)
|
||||
end
|
||||
function c:banCID(cid)
|
||||
--
|
||||
end
|
||||
function c:banIP(ip)
|
||||
--
|
||||
end
|
||||
function c:broadcast(name)
|
||||
--
|
||||
end
|
||||
function c:send(ip,data,port,cid)
|
||||
--
|
||||
end
|
||||
function c:pollClientModules(ip,port)
|
||||
--
|
||||
end
|
||||
function c:CIDFrom(ip,port)
|
||||
--
|
||||
end
|
||||
function c:sendAll(data)
|
||||
--
|
||||
end
|
||||
function c:sendAllBut(data,cid)
|
||||
--
|
||||
end
|
||||
function c:clientRegistered(cid)
|
||||
--
|
||||
end
|
||||
function c:clientLoggedIn(cid)
|
||||
--
|
||||
end
|
||||
function c:update()
|
||||
--
|
||||
end
|
||||
c.Updater=multi:newUpdater(0)
|
||||
c.Updater.link=c
|
||||
c.updater:OnUpdate(function(self)
|
||||
self.link:update()
|
||||
end)
|
||||
c.OnClientsModulesList=multi:newConnection(false)
|
||||
c.OnDataRecieved=multi:newConnection(false)
|
||||
c.OnClientClosed=multi:newConnection(false)
|
||||
c.OnClientConnected=multi:newConnection(false)
|
||||
end
|
||||
function net:newUDPClient(host,port,servercode)
|
||||
local c={}
|
||||
c.host=host
|
||||
c.port=port
|
||||
function c:setUpdateRate(n)
|
||||
self.updater:setSkip(n or 0)
|
||||
end
|
||||
function c:send(data)
|
||||
--
|
||||
end
|
||||
function c:sendRaw(data)
|
||||
--
|
||||
end
|
||||
function c:close()
|
||||
--
|
||||
end
|
||||
function c:getCID()
|
||||
--
|
||||
end
|
||||
function c:update()
|
||||
--
|
||||
end
|
||||
function c:reconnect()
|
||||
--
|
||||
end
|
||||
function c:IDAssigned()
|
||||
--
|
||||
end
|
||||
c.Updater=multi:newUpdater(0)
|
||||
c.Updater.link=c
|
||||
c.updater:OnUpdate(function(self)
|
||||
self.link:update()
|
||||
end)
|
||||
c.OnDataRecieved=multi:newConnection(false)
|
||||
c.OnClientReady=multi:newConnection(false)
|
||||
c.OnClientDisconnected=multi:newConnection(false)
|
||||
c.OnConnectionRegained=multi:newConnection(false)
|
||||
c.OnPingRecieved=multi:newConnection(false)
|
||||
c.OnServerNotAvailable=multi:newConnection(false)
|
||||
end
|
||||
@ -40,13 +40,14 @@ for i = 97,122 do
|
||||
end
|
||||
local isHyphen = {[9]=1,[14]=1,[19]=1,[24]=1}
|
||||
math.randomseed(os.time())
|
||||
local multi = require("multi")
|
||||
local socket=require("socket")
|
||||
local http=require("socket.http")
|
||||
local mime=require("mime")
|
||||
--ssl=require("ssl")
|
||||
--https=require("ssl.https")
|
||||
local net={}
|
||||
net.Version={2,0,1} -- This will probably stay this version for quite a while... The modules on the otherhand will be more inconsistant
|
||||
net.Version={3,0,0} -- This will probably stay this version for quite a while... The modules on the otherhand will be more inconsistant
|
||||
net._VERSION="3.0.0"
|
||||
net.ClientCache = {}
|
||||
net.OnServerCreated=multi:newConnection()
|
||||
|
||||
24
rockspec/lua-net-3.0-0.rockspec
Normal file
24
rockspec/lua-net-3.0-0.rockspec
Normal file
@ -0,0 +1,24 @@
|
||||
package = "lua-net"
|
||||
version = "3.0-0"
|
||||
source = {
|
||||
url = "git://github.com/rayaman/net.git",
|
||||
tag = "v3.0.0",
|
||||
}
|
||||
description = {
|
||||
summary = "Lua networking library that wraps around lua-socket to make networking easy.",
|
||||
detailed = [[
|
||||
This library uses the multi library. The new multitasking library and this one are now co-Dependant if using the networkManager integration for network parallelism. This has an event driven approach for networking which allows one to easily work async with the data.
|
||||
]],
|
||||
homepage = "https://github.com/rayaman/net",
|
||||
license = "MIT"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1",
|
||||
"multi"
|
||||
}
|
||||
build = {
|
||||
type = "builtin",
|
||||
modules = {
|
||||
["net.init"] = "net/init.lua",
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user