Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a4daa3dd8 | |||
| 950b7e3fa3 | |||
| a7189fab8b |
@ -27,7 +27,7 @@ A simple and powerful way to make servers and clients
|
|||||||
- [ ] AUDP - advance udp. Ensures packets arrive and handles late packets.
|
- [ ] AUDP - advance udp. Ensures packets arrive and handles late packets.
|
||||||
- [ ] P2P - peer to peer (Server to set up initial connection)
|
- [ ] P2P - peer to peer (Server to set up initial connection)
|
||||||
- [ ] Relay - offput server load (locally)
|
- [ ] Relay - offput server load (locally)
|
||||||
- [ ] Threading - Simple threading ~~(UDP/AUDP Only)~~ Thanks to an updated multi library we can thread with ease
|
- [ ] Threading - Simple threading Should be simple using multi@15.3.0
|
||||||
- [ ] Priority handling
|
- [ ] Priority handling
|
||||||
|
|
||||||
# Note
|
# Note
|
||||||
|
|||||||
@ -469,6 +469,9 @@ function net:newUDPClient(host,port,servercode,nonluaServer)
|
|||||||
net.OnClientCreated:Fire(c)
|
net.OnClientCreated:Fire(c)
|
||||||
return c
|
return c
|
||||||
end
|
end
|
||||||
|
multi:newThread(function()
|
||||||
|
|
||||||
|
end)
|
||||||
--TCP Stuff
|
--TCP Stuff
|
||||||
function net:newTCPClientObject(fd)
|
function net:newTCPClientObject(fd)
|
||||||
local c = {}
|
local c = {}
|
||||||
@ -821,7 +824,7 @@ function net:newTCPClient(host,port)
|
|||||||
len = bin.new(dat):getBlock("n",self.numspace)
|
len = bin.new(dat):getBlock("n",self.numspace)
|
||||||
data, err = self.tcp:receive(len)
|
data, err = self.tcp:receive(len)
|
||||||
else
|
else
|
||||||
data, err = self.tcp:receive()
|
data,err = self.tcp:receive()
|
||||||
end
|
end
|
||||||
if err=="closed" then
|
if err=="closed" then
|
||||||
self.OnClientDisconnected:Fire(self,err)
|
self.OnClientDisconnected:Fire(self,err)
|
||||||
|
|||||||
@ -14,7 +14,6 @@ description = {
|
|||||||
}
|
}
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"lua >= 5.1",
|
"lua >= 5.1",
|
||||||
"luasocket",
|
|
||||||
"multi"
|
"multi"
|
||||||
}
|
}
|
||||||
build = {
|
build = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user