# Path: sockjs/transports/base.py
# class Transport:
#     def __init__(self, manager, session, request):
#         self.manager = manager
#         self.session = session
#         self.request = request
# 
# Path: sockjs/exceptions.py
# class SessionIsClosed(SockjsException):
#     """Session is closed."""
# 
# Path: sockjs/protocol.py
# FRAME_CLOSE = "c"
# 
# FRAME_MESSAGE = "a"
# 
# FRAME_MESSAGE_BLOB = "a1"
# 
# FRAME_HEARTBEAT = "h"


import asyncio
from aiohttp import web
from asyncio import ensure_future
from .base import Transport
from ..exceptions import SessionIsClosed
from ..protocol import FRAME_CLOSE, FRAME_MESSAGE, FRAME_MESSAGE_BLOB, FRAME_HEARTBEAT
"""raw websocket transport."""




class RawWebSocketTransport(Transport):
    async def server(self, ws, session):
        while True:
            try:
                frame, data = await session._wait(pack=False)

# Path: sockjs/transports/base.py
# class Transport:
#     def __init__(self, manager, session, request):
#         self.manager = manager
#         self.session = session
#         self.request = request
# 
# Path: sockjs/exceptions.py
# class SessionIsClosed(SockjsException):
#     """Session is closed."""
# 
# Path: sockjs/protocol.py
# FRAME_CLOSE = "c"
# 
# FRAME_MESSAGE = "a"
# 
# FRAME_MESSAGE_BLOB = "a1"
# 
# FRAME_HEARTBEAT = "h"


# Path: sockjs/transports/rawwebsocket.py
import asyncio
from aiohttp import web
from asyncio import ensure_future
from .base import Transport
from ..exceptions import SessionIsClosed
from ..protocol import FRAME_CLOSE, FRAME_MESSAGE, FRAME_MESSAGE_BLOB, FRAME_HEARTBEAT

"""raw websocket transport."""




class RawWebSocketTransport(Transport):
    async def server(self, ws, session):
        while True:
            try:
                frame, data = await session._wait(pack=False)

            except SessionIsClosed: