Skip to content

Commit

Permalink
autobahn test server: set sufficient max message size
Browse files Browse the repository at this point in the history
Partially addresses #147
  • Loading branch information
belm0 committed Feb 1, 2021
1 parent 751c642 commit dbf819d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autobahn/server.py
Expand Up @@ -17,6 +17,7 @@

BIND_IP = '0.0.0.0'
BIND_PORT = 9000
MAX_MESSAGE_SIZE = 16 * 1024 * 1024
logging.basicConfig()
logger = logging.getLogger('client')
logger.setLevel(logging.INFO)
Expand All @@ -26,7 +27,8 @@
async def main():
''' Main entry point. '''
logger.info('Starting websocket server on ws://%s:%d', BIND_IP, BIND_PORT)
await serve_websocket(handler, BIND_IP, BIND_PORT, ssl_context=None)
await serve_websocket(handler, BIND_IP, BIND_PORT, ssl_context=None,
max_message_size=MAX_MESSAGE_SIZE)


async def handler(request):
Expand Down

0 comments on commit dbf819d

Please sign in to comment.