I just found a way to get it to work:
sock = socket.tcp(cv)
function propersrc()
if done then return nil end
local chunk, err, partial = sock:receive(socket.BLOCKSIZE)
if not err then return chunk
elseif err == "closed" then
sock:close()
done = 1
return partial
else return nil, err end
end
for _, v in mp.unpacker(propersrc) do
print("UNPACK: ",v)
end
(basically by copying some code from
https://github.com/diegonehab/luasocket/blob/d80bb0d82ba105c8fdb27e6174c267965d06ffb0/src/socket.lua obviously this is not the right way though,
so I'd be interested in knowing how you're supposed to do it)