Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fd_lib = {
- FD_CLR = function (fd, set)
- for i = 0, set.fd_count do
- if set.fd_array[i] == fd then
- while i < set.fd_count-1
- set.fd_array[i] = set.fd_array[i + 1]
- i = i + 1
- end
- set.fd_count = set.fd_count - 1
- break
- end
- end
- end,
- FD_SET = function (fd, set)
- local Index
- for i = 0, set.fd_count do
- if set.fd_array[i] == fd then
- Index = i
- break
- end
- end
- if Index = set.fd_count then
- if set.fd_count < 64 then
- set.fd_array[i] = fd
- set.fd_count = set.fd_count + 1
- end
- end
- end,
- FD_ZERO = function (set)
- set.fd_count = 0
- end,
- FD_ISSET = sock.__WSAFDIsSet,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement