boundary/meter_client.py
def _call_api(self):
        """
        Make a call to the meter via JSON RPC
        """

        # Allocate a socket and connect to the meter
        sockobj = socket(AF_INET, SOCK_STREAM)
        sockobj.connect((self.rpc_host, self.rpc_port))
        self.get_json()
        message = [self.rpc_message.encode('utf-8')]

        for line in message:
            sockobj.send(line)
            data = sockobj.recv(self.MAX_LINE)
            print(data)
            self.rpc_data.append(data)

        sockobj.close()
def _call_api(self):
        # Allocate a socket and connect to the meter
        sockobj = socket(AF_INET, SOCK_STREAM)
        sockobj.connect((self.rpc_host, self.rpc_port))
        self.get_json()
        message = [self.rpc_message.encode('utf-8')]

        for line in message:
            sockobj.send(line)
            data = sockobj.recv(self.MAX_LINE)
            print(data)
            self.rpc_data.append(data)

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