use proper socket connection for client