added refreshSockets()