#!/usr/bin/python
#----------------------------------------------------------------------#

## IMPORTS ##

### PANDA Imports ###

### Net Core ###
from Sockets.TCP_Socket import SocketTCP
from .manager import Manager

########################################################################

## Simple Network Server ##

class Server():

    def __init__(self, _parent=None):
        self.parent = _parent

        # Sockets
        self.socketTCP = None
        self.manager = None

    def start(self):
        self.setSocket()
        self.socketTCP.start()

        # Manager
        self.manager = Manager(self)
        self.manager.start()

        # Set clientObjects holder
        self.socketTCP.activeConnections = self.manager.clientObjects

    def setSocket(self):
        self.socketTCP = SocketTCP()

    def sendPacket(self, _type, _data, _connection, _channel=0): #0=tcp, 1=udp
        self.manager.buildPacket(_type, _data, _connection, _channel)
48de909cd3b89ac99ebc391fa63fbc8f8c6aea6a
<mask token>


class Server:

    def __init__(self, _parent=None):
        self.parent = _parent
        self.socketTCP = None
        self.manager = None
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Server:

    def __init__(self, _parent=None):
        self.parent = _parent
        self.socketTCP = None
        self.manager = None

    def start(self):
        self.setSocket()
        self.socketTCP.start()
        self.manager = Manager(self)
        self.manager.start()
        self.socketTCP.activeConnections = self.manager.clientObjects
    <mask token>

    def sendPacket(self, _type, _data, _connection, _channel=0):
        self.manager.buildPacket(_type, _data, _connection, _channel)

<mask token>


class Server:

    def __init__(self, _parent=None):
        self.parent = _parent
        self.socketTCP = None
        self.manager = None

    def start(self):
        self.setSocket()
        self.socketTCP.start()
        self.manager = Manager(self)
        self.manager.start()
        self.socketTCP.activeConnections = self.manager.clientObjects

    def setSocket(self):
        self.socketTCP = SocketTCP()

    def sendPacket(self, _type, _data, _connection, _channel=0):
        self.manager.buildPacket(_type, _data, _connection, _channel)

from Sockets.TCP_Socket import SocketTCP
from .manager import Manager


class Server:

    def __init__(self, _parent=None):
        self.parent = _parent
        self.socketTCP = None
        self.manager = None

    def start(self):
        self.setSocket()
        self.socketTCP.start()
        self.manager = Manager(self)
        self.manager.start()
        self.socketTCP.activeConnections = self.manager.clientObjects

    def setSocket(self):
        self.socketTCP = SocketTCP()

    def sendPacket(self, _type, _data, _connection, _channel=0):
        self.manager.buildPacket(_type, _data, _connection, _channel)

#!/usr/bin/python
#----------------------------------------------------------------------#

## IMPORTS ##

### PANDA Imports ###

### Net Core ###
from Sockets.TCP_Socket import SocketTCP
from .manager import Manager

########################################################################

## Simple Network Server ##

class Server():

    def __init__(self, _parent=None):
        self.parent = _parent

        # Sockets
        self.socketTCP = None
        self.manager = None

    def start(self):
        self.setSocket()
        self.socketTCP.start()

        # Manager
        self.manager = Manager(self)
        self.manager.start()

        # Set clientObjects holder
        self.socketTCP.activeConnections = self.manager.clientObjects

    def setSocket(self):
        self.socketTCP = SocketTCP()

    def sendPacket(self, _type, _data, _connection, _channel=0): #0=tcp, 1=udp
        self.manager.buildPacket(_type, _data, _connection, _channel)