def send(self, data):
try:<EOL><INDENT>if not data:<EOL><INDENT>raise RconError('<STR_LIT>')<EOL><DEDENT>with self.lock:<EOL><INDENT>self.socket.send(self._rconsendstring.format(self.password, data))<EOL><DEDENT><DEDENT>except socket.error as e:<EOL><INDENT>raise RconError(e.message, e)<EOL><DEDENT>else:<EOL><INDENT>timeout = self._timeout<EOL>command = data.split('<STR_LIT:U+0020>')[<NUM_LIT:0>]<EOL>if command in self._long_commands_timeout:<EOL><INDENT>timeout = self._long_commands_timeout[command]<EOL><DEDENT>return self.recvall(timeout=timeout)<EOL><DEDENT>
Send a RCON command over the socket
:param data: The command to send
:raise RconError: When it's not possible to evaluate the command
:return str: The server response to the RCON command