socket management