How Python Socket Detect The Server Is Closed When Continue Sending

How Python Socket Detect The Server Is Closed When Continue Sending