Use arguments to avoid lock
Need to dispose of sockets appropriately