140 buf = buf:sub(chunk_start + chunk_size + 2); |
140 buf = buf:sub(chunk_start + chunk_size + 2); |
141 chunk_size, chunk_start = nil, nil; |
141 chunk_size, chunk_start = nil, nil; |
142 if success_on_chunk then |
142 if success_on_chunk then |
143 success_cb(packet); |
143 success_cb(packet); |
144 end |
144 end |
|
145 break; |
145 else -- Partial chunk remaining |
146 else -- Partial chunk remaining |
146 break; |
147 break; |
147 end |
148 end |
148 elseif len and #buf >= len then |
149 elseif len and #buf >= len then |
149 if packet.code == 101 then |
150 if packet.code == 101 then |