def write(self, data):
<EOL>if self._ignore_write_operations:<EOL><INDENT>return<EOL><DEDENT>assert self.is_connected()<EOL>try:<EOL><INDENT>self._connection.send(data.encode('<STR_LIT:ascii>'))<EOL><DEDENT>except socket.error:<EOL><INDENT>self.close()<EOL>self._ignore_write_operations = True<EOL><DEDENT>
Sends some data to the client.