Socket server framework