easymodbus/modbusClient.py
def close(self):
        """
        Closes Serial port, or TCP-Socket connection
        """
        if self.__ser is not None:
            self.__ser.close()
        if self.__tcpClientSocket is not None:
            self.__stoplistening = True
            self.__tcpClientSocket.shutdown(socket.SHUT_RDWR)
            self.__tcpClientSocket.close()
        self.__connected = False
        logging.info("Modbus client connection closed")

        Closes Serial port, or TCP-Socket connection
        
Closes Serial port, or TCP-Socket connection
Closes Serial port or TCP - Socket connection
def close(self):
        if self.__ser is not None:
            self.__ser.close()
        if self.__tcpClientSocket is not None:
            self.__stoplistening = True
            self.__tcpClientSocket.shutdown(socket.SHUT_RDWR)
            self.__tcpClientSocket.close()
        self.__connected = False
        logging.info("Modbus client connection closed")
def close ( self ) : if self . __ser is not None : self . __ser . close ( ) if self . __tcpClientSocket is not None : self . __stoplistening = True self . __tcpClientSocket . shutdown ( socket . SHUT_RDWR ) self . __tcpClientSocket . close ( ) self . __connected = False logging . info ( "Modbus client connection closed" )
Closes Serial port, or TCP-Socket connection
Closes Serial port or TCP - Socket connection
"""
        Closes Serial port, or TCP-Socket connection
        """
self