# Path: ejtp/jacks/core.py
# class Jack(object):
#     def __init__(self, router, interface):
#     def run(self):
#     def close(self):
#     def route(self, msg):
#     def recv(self, data):
#     def run_threaded(self):
#     def ifacetype(self):
# def make(router, iface):


import socket
import logging
from persei import RawDataDecorator
from ejtp.jacks import core as jack
GNU Lesser Public License for more details.

You should have received a copy of the GNU Lesser Public License
along with the Python EJTP library.  If not, see 
<http://www.gnu.org/licenses/>.
'''


'''
    UDPJack

    IPv6 UDP jack, currently programmed quick and dirty to serve forever.
'''

logger = logging.getLogger(__name__)



class UDPJack(jack.Jack):

    def __init__(self, router, host='::', port=3972, ipv=6):
        if ipv==6:
            ifacetype = "udp"
            self.address = (host, port, 0, 0)
            sockfamily = socket.AF_INET6
        else: 
            ifacetype = "udp4"
            self.address = (host, port)
            sockfamily = socket.AF_INET


# Path: ejtp/jacks/core.py
# class Jack(object):
#     def __init__(self, router, interface):
#     def run(self):
#     def close(self):
#     def route(self, msg):
#     def recv(self, data):
#     def run_threaded(self):
#     def ifacetype(self):
# def make(router, iface):


# Path: ejtp/jacks/udp.py
import socket
import logging
from persei import RawDataDecorator
from ejtp.jacks import core as jack

GNU Lesser Public License for more details.

You should have received a copy of the GNU Lesser Public License
along with the Python EJTP library.  If not, see 
<http://www.gnu.org/licenses/>.
'''


'''
    UDPJack

    IPv6 UDP jack, currently programmed quick and dirty to serve forever.
'''

logger = logging.getLogger(__name__)



class UDPJack(jack.Jack):

    def __init__(self, router, host='::', port=3972, ipv=6):
        if ipv==6:
            ifacetype = "udp"
            self.address = (host, port, 0, 0)
            sockfamily = socket.AF_INET6
        else: 
            ifacetype = "udp4"
            self.address = (host, port)
            sockfamily = socket.AF_INET


        jack.Jack.__init__(self, router, (ifacetype, (host, port)))