packet = ReadBootProtocolPacket(*socket.recvfrom(4096))exceptOSError:# OSError: [WinError 10038] An operation was attempted on something that is not a socketpasselse: self.received(packet)fortransaction_id, transactioninlist(self.transactions.items()):iftransaction.is_done(): transaction.close()...
Source File: sockets.py From Doga with MIT License 5 votes def capture(self, sock): """ Capture packets in traffic param: sock(socket._socketobject): raw socket that listen for traffic """ while True: # socket.recvfrom() method returns tuple object packet_tuple = sock.recvfrom(65565...