CustomCloud.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:hologram-python 作者: hologram-io 项目源码 文件源码
def close_send_socket(self):
        try:
            # Check if we're going to use the AT command version of sockets or the
            # native Python socket lib.
            if self.__to_use_at_sockets():
                self.network.close_socket()
            else:
                try:
                    self.sock.shutdown(socket.SHUT_RDWR)
                except socket.error:
                    pass

                self.sock.close()

            self._is_send_socket_open = False
            self.logger.info('Socket closed.')
        except (IOError):
            self.logger.error('An error occurred while attempting to send the message to the cloud')
            self.logger.error('Please try again.')

    # EFFECTS: Receives data from inbound socket.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号