Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server uses wrong MSS #696

Open
krzysiek6d opened this issue Dec 19, 2017 · 1 comment
Open

Server uses wrong MSS #696

krzysiek6d opened this issue Dec 19, 2017 · 1 comment

Comments

@krzysiek6d
Copy link

krzysiek6d commented Dec 19, 2017

Hi

Something is wrong when you accept new connection. This leads to problems when you want enable jumbo frames in your network. Here is how to reproduce it on localhost, but the real environment would be between two machines - and the behaviour is the same.

Simulate jumbo frame support on localhost:
$ sudo ip link set mtu 2500 dev lo

run ws server and connect 'curl http://localhost:9002:

 $ ./wss_server             
on http
MTU: 2500 MSS: 1448
[2017-12-19 22:33:14] [http] localhost:9002 127.0.0.1:48518 "GET / HTTP/1.1" 200 5018 "curl/7.57.0" 

run asio echo server and connect 'telnet localhost 8888'

 $ ./asio_server 8888
session: MTU: 2500 MSS: 2448

You can see that for websocket connection wrong MSS is calculated.
In attachement you can see two directories:

  • asio_async_server
  • wss

asio_async_server
asio_async_server conatins asio server from boost asio examples with MTU/MSS debugging infomation.
Building:

mkdir bin
cd bin
cmake ..
make

Running on i.e. port 8888
./asio_server 8888
Connecting - from another console
telnet localhost 8888

wss
wss server conatins websocketpp server based on example code from your repository. Server is running on port 9002
Building

mkdir bin
cd bin
cmake ..
make

Running
./wss_server
Connecting - from another console
curl http://localhost:9002

Br,
krzysiek6d
bug.zip

@krzysiek6d
Copy link
Author

Sorry for closing it so lately ;)
thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant