# Path: sockjs/cyclone/transports/base.py
# class BaseTransportMixin(object):
# class MultiplexTransport(BaseTransportMixin):
#     def get_conn_info(self):
#     def session_closed(self):
#     def __init__(self, conn_info):
#     def get_conn_info(self):
# 
# Path: sockjs/cyclone/session.py
# class MultiplexChannelSession(BaseSession):
#     def __init__(self, conn, server, base, name):
#         super(MultiplexChannelSession, self).__init__(conn, server)
# 
#         self.base = base
#         self.name = name
# 
#     def send_message(self, msg, stats=True):
#         if not self.base.is_closed:
#             msg = 'msg,%s,%s' % (self.name, msg)
#             self.base.session.send_message(msg, stats)
# 
#     def messageReceived(self, msg):
#         self.conn.messageReceived(msg)
# 
#     def close(self, code=3000, message='Go away!'):
#         self.base.sendMessage('uns,%s' % self.name)
#         self._close(code, message)
# 
#     # Non-API version of the close, without sending the close message
#     def _close(self, code=3000, message='Go away!'):
#         super(MultiplexChannelSession, self).close(code, message)


from twisted.python import log
from sockjs.cyclone.transports import base
from sockjs.cyclone.session import MultiplexChannelSession
        loop in your code.

        @param clients: Clients iterable
        @param message: Message to send
        """
        self.session.broadcast(clients, message)

    def close(self):
        self.session.close()

    @property
    def is_closed(self):
        """ Check if connection was closed """
        return self.session.is_closed


class MultiplexConnection(SockJSConnection):
    channels = {}

    def _messageSplit(self, message):
        parts = message.split(',', 2)
        if len(parts) == 3:
            return parts[0], parts[1], parts[2]
        elif len(parts) == 2:
            return parts[0], parts[1], None
        else:
            raise ValueError

    def connectionMade(self, info):
        self.endpoints = dict()

# Path: sockjs/cyclone/transports/base.py
# class BaseTransportMixin(object):
# class MultiplexTransport(BaseTransportMixin):
#     def get_conn_info(self):
#     def session_closed(self):
#     def __init__(self, conn_info):
#     def get_conn_info(self):
# 
# Path: sockjs/cyclone/session.py
# class MultiplexChannelSession(BaseSession):
#     def __init__(self, conn, server, base, name):
#         super(MultiplexChannelSession, self).__init__(conn, server)
# 
#         self.base = base
#         self.name = name
# 
#     def send_message(self, msg, stats=True):
#         if not self.base.is_closed:
#             msg = 'msg,%s,%s' % (self.name, msg)
#             self.base.session.send_message(msg, stats)
# 
#     def messageReceived(self, msg):
#         self.conn.messageReceived(msg)
# 
#     def close(self, code=3000, message='Go away!'):
#         self.base.sendMessage('uns,%s' % self.name)
#         self._close(code, message)
# 
#     # Non-API version of the close, without sending the close message
#     def _close(self, code=3000, message='Go away!'):
#         super(MultiplexChannelSession, self).close(code, message)


# Path: sockjs/cyclone/conn.py
from twisted.python import log
from sockjs.cyclone.transports import base
from sockjs.cyclone.session import MultiplexChannelSession

        loop in your code.

        @param clients: Clients iterable
        @param message: Message to send
        """
        self.session.broadcast(clients, message)

    def close(self):
        self.session.close()

    @property
    def is_closed(self):
        """ Check if connection was closed """
        return self.session.is_closed


class MultiplexConnection(SockJSConnection):
    channels = {}

    def _messageSplit(self, message):
        parts = message.split(',', 2)
        if len(parts) == 3:
            return parts[0], parts[1], parts[2]
        elif len(parts) == 2:
            return parts[0], parts[1], None
        else:
            raise ValueError

    def connectionMade(self, info):
        self.endpoints = dict()

        self.handler = base.MultiplexTransport(self.session.conn_info)