def disconnect(self):
if self.connected:
try:
self.sock.shutdown(socket.SHUT_WR)
self.sock.close()
self.connected = False
except SocketError as e:
print("Server must have disconnected first!")
print("Disconnection successful!")
else:
print("Nothing to disconnect!")
评论列表
文章目录