The "abusive nature" of using global variables, to me, at least, is that they get set without getting unset later when the socket has finished its routine. If Linux user must use global variables, he should unset them using the sockclose event. This way you don't have them occupy the space of variables unnecessarily.