Make last_endpoint attribute of socket object