The documented patterns for client:receive are '*a', '*l', or a number. Is it possible to get everything that is available on the socket in a given moment? (I'm using socket.select with all connections with settimeout(0).)
From--[[--- data, emsg = sockext.read(client, pattern[, prefix])Identical to client:receive(), except that if partial data was read, it returnsit instead of returning nil.This is convenient for binary/non-line-delimited protocols.]]function read(client, pattern, prefix)local data, emsg, partial = client:receive(pattern, prefix)if data thenreturn dataendif partial and #partial > 0 thenreturn partialendreturn nil, emsgend
I couldn't also find in the API a way to check if the client connection with the server is still open.