diff options
Diffstat (limited to 'pysnmp/carrier/asyncio/dgram/udp.py')
-rw-r--r-- | pysnmp/carrier/asyncio/dgram/udp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pysnmp/carrier/asyncio/dgram/udp.py b/pysnmp/carrier/asyncio/dgram/udp.py index aa73fb10..f80de36b 100644 --- a/pysnmp/carrier/asyncio/dgram/udp.py +++ b/pysnmp/carrier/asyncio/dgram/udp.py @@ -33,6 +33,7 @@ import socket from pysnmp.carrier.base import AbstractTransportAddress from pysnmp.carrier.asyncio.dgram.base import DgramAsyncioProtocol + try: import asyncio except ImportError: @@ -42,11 +43,14 @@ loop = asyncio.get_event_loop() domainName = snmpUDPDomain = (1, 3, 6, 1, 6, 1, 1) + class UdpTransportAddress(tuple, AbstractTransportAddress): pass + class UdpAsyncioTransport(DgramAsyncioProtocol): sockFamily = socket.AF_INET addressType = UdpTransportAddress + UdpTransport = UdpAsyncioTransport |