# Path: quads/tools/helpers.py
# def get_running_loop() -> asyncio.AbstractEventLoop:
#     loop = asyncio.get_event_loop()
#     if not loop.is_running():
#         raise RuntimeError("The object should be created within an async function")
#     return loop


import socket
from quads.tools.helpers import get_running_loop
#!/usr/bin/python3



class Netcat:
    """Python 'netcat like' module"""

    def __init__(self, ip, port=22, loop=None):
        self.ip = ip
        self.port = port
        self.buff = ""
        self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Path: quads/tools/helpers.py
# def get_running_loop() -> asyncio.AbstractEventLoop:
#     loop = asyncio.get_event_loop()
#     if not loop.is_running():
#         raise RuntimeError("The object should be created within an async function")
#     return loop


# Path: quads/tools/netcat.py
import socket
from quads.tools.helpers import get_running_loop

#!/usr/bin/python3



class Netcat:
    """Python 'netcat like' module"""

    def __init__(self, ip, port=22, loop=None):
        self.ip = ip
        self.port = port
        self.buff = ""
        self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        self.loop = loop if loop else get_running_loop()