artemis/titles/idz/echo.py

15 lines
405 B
Python
Raw Normal View History

2023-04-23 08:38:28 +00:00
from twisted.internet.protocol import DatagramProtocol
import logging
from core.config import CoreConfig
from .config import IDZConfig
2024-01-09 17:21:31 +00:00
class IDZEcho:
def connection_made(self, transport):
self.transport = transport
def datagram_received(self, data, addr):
message = data.decode()
self.logger.debug(f'Received echo from {addr}')
self.transport.sendto(data, addr)