mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
add socket:available() --> int
This commit is contained in:
parent
e94b70fd3a
commit
13de581b4b
5 changed files with 17 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ local Socket = {__index={
|
|||
send=function(self, ...) return network.__send(self.id, ...) end,
|
||||
recv=function(self, ...) return network.__recv(self.id, ...) end,
|
||||
close=function(self) return network.__close(self.id) end,
|
||||
available=function(self) return network.__available(self.id) or 0 end,
|
||||
is_alive=function(self) return network.__is_alive(self.id) end,
|
||||
is_connected=function(self) return network.__is_connected(self.id) end,
|
||||
get_address=function(self) return network.__get_address(self.id) end,
|
||||
|
|
|
|||
|
|
@ -424,6 +424,7 @@ function __vc_resume_coroutine(id)
|
|||
if co then
|
||||
coroutine.resume(co)
|
||||
if __vc_coroutine_error then
|
||||
debug.error(__vc_coroutine_error)
|
||||
error(__vc_coroutine_error)
|
||||
end
|
||||
return coroutine.status(co) ~= "dead"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue