def _call_api(self):
<EOL>sockobj = socket(AF_INET, SOCK_STREAM)<EOL>sockobj.connect((self.rpc_host, self.rpc_port))<EOL>self.get_json()<EOL>message = [self.rpc_message.encode('<STR_LIT:utf-8>')]<EOL>for line in message:<EOL><INDENT>sockobj.send(line)<EOL>data = sockobj.recv(self.MAX_LINE)<EOL>print(data)<EOL>self.rpc_data.append(data)<EOL><DEDENT>sockobj.close()<EOL>
Make a call to the meter via JSON RPC