137 self.__connection.shutdown(socket.SHUT_RDWR) |
138 self.__connection.shutdown(socket.SHUT_RDWR) |
138 self.__connection.close() |
139 self.__connection.close() |
139 |
140 |
140 def poll(self): |
141 def poll(self): |
141 """ |
142 """ |
142 Public method to check and receive one message (if available) |
143 Public method to check and receive one message (if available). |
143 """ |
144 """ |
144 try: |
145 try: |
145 rrdy, wrdy, xrdy = select.select([self.__connection], [], [], 0) |
146 rrdy, wrdy, xrdy = select.select([self.__connection], [], [], 0) |
146 if self.__connection in rrdy: |
147 if self.__connection in rrdy: |
147 self.__receiveJson() |
148 self.__receiveJson() |