When pulling from a socket, the packet size is how much data is read by the 'sockread'.

Using a while/goto loop will process all the queued data in the one event trigger, as against re-triggering the event over-and-over.

During the re-triggering of the event, it's possible (but doubtful) that another even tcould trigger, thus changing the environment scope..

But I guess it all depends on how you've written your event.